Only update creation time if flie size is 0
@@ -189,12 +189,14 @@ public class FileManager extends OutputStreamManager {
LOGGER.debug("Now writing to {} at {}", filename, new Date());
final File file = new File(filename);
final FileOutputStream fos = new FileOutputStream(file, isAppend);
+ if (file.exists() && file.length() == 0) {
try {
FileTime now = FileTime.fromMillis(System.currentTimeMillis());
Files.setAttribute(file.toPath(), "creationTime", now);
} catch (Exception ex) {
LOGGER.warn("Unable to set current file tiem for {}", filename);
}
+ }
defineAttributeView(Paths.get(filename));
return fos;
}
