Ensure modification date greater than creation
This commit is contained in:
parent
39f848cccc
commit
b9854d31e3
@ -118,7 +118,7 @@ public class AnvilCommands {
|
|||||||
BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
|
BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
|
||||||
long creation = attr.creationTime().toMillis();
|
long creation = attr.creationTime().toMillis();
|
||||||
long modified = attr.lastModifiedTime().toMillis();
|
long modified = attr.lastModifiedTime().toMillis();
|
||||||
if (modified - creation < fileAgeMillis) {
|
if (modified - creation < fileAgeMillis && modified > creation) {
|
||||||
mca.setDeleted(true);
|
mca.setDeleted(true);
|
||||||
get().add(512 * 512 * 256);
|
get().add(512 * 512 * 256);
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user