Small fixes in backup engine

This commit is contained in:
Marc Baloup 2022-12-15 02:08:00 +01:00
parent dcfbb3e06a
commit c02763beea
Signed by: marcbal
GPG Key ID: BBC0FE3ABC30B893
2 changed files with 3 additions and 2 deletions

View File

@ -102,7 +102,7 @@ public abstract class BackupCleaner implements UnaryOperator<TreeSet<LocalDateTi
Chat c = text("[Backup] ") Chat c = text("[Backup] ")
.then(text(compressDisplayName).gray()) .then(text(compressDisplayName).gray())
.thenText(testOnly ? " Archive cleanup debug (no files are actually deleted):" : "Deleted archive files:\n"); .thenText(testOnly ? " Archive cleanup debug (no files are actually deleted):\n" : " Deleted archive files:\n");
boolean oneDeleted = false; boolean oneDeleted = false;
for (Entry<LocalDateTime, File> datedFile : datedFiles.entrySet()) { for (Entry<LocalDateTime, File> datedFile : datedFiles.entrySet()) {
if (keptFiles.contains(datedFile.getKey())) { if (keptFiles.contains(datedFile.getKey())) {

View File

@ -133,8 +133,9 @@ public abstract class CompressProcess implements Comparable<CompressProcess>, Ru
PerformanceAnalysisManager.getInstance().removeBossBar(bossBar); PerformanceAnalysisManager.getInstance().removeBossBar(bossBar);
} }
}); });
} finally { } catch (Throwable t) {
backupManager.compressRunning.set(null); backupManager.compressRunning.set(null);
throw t;
} }
} }