Call the backup cleaner method
This commit is contained in:
parent
264300ead6
commit
f2d1acd24a
@ -104,6 +104,12 @@ public abstract class CompressProcess implements Comparable<CompressProcess>, Ru
|
||||
backupManager.persist.updateDirtyStatusAfterCompress(type, name);
|
||||
|
||||
displayDirtynessStatus();
|
||||
|
||||
try {
|
||||
type.backupCleaner(backupManager.config).cleanupArchives(targetDir);
|
||||
} catch (Exception e) {
|
||||
Log.severe(e);
|
||||
}
|
||||
}
|
||||
catch (final Exception e) {
|
||||
Log.severe("[Backup] Failed: " + sourceDir + " -> " + target, e);
|
||||
|
@ -16,4 +16,11 @@ public enum Type {
|
||||
};
|
||||
}
|
||||
|
||||
public BackupCleaner backupCleaner(BackupConfig cfg) {
|
||||
return switch (this) {
|
||||
case WORLDS -> cfg.worldBackupCleaner;
|
||||
case WORKDIR -> cfg.workdirBackupCleaner;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user