Ignore folders when checking file last edit date
This commit is contained in:
@@ -22,6 +22,9 @@ public class Cleanup implements Runnable {
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
for (File file : directory.listFiles()) {
|
||||
if (file.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
if (time - file.lastModified() > diff) {
|
||||
PlayerVaults.getInstance().getLogger().info("Deleting vault file (cleanup): " + file.getName());
|
||||
file.delete();
|
||||
|
||||
Reference in New Issue
Block a user