From 3648d0ca94c9954fa7c4797ce64a0f42a4f837b5 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sun, 24 Jan 2021 20:10:58 +0800 Subject: BugFix: incremental backup shows incorrect file count and size. --- .../backup/incremental/manager/IncrementalBackupStorageManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/com/keuin/kbackupfabric') diff --git a/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncrementalBackupStorageManager.java b/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncrementalBackupStorageManager.java index 9060d88..be01966 100644 --- a/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncrementalBackupStorageManager.java +++ b/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncrementalBackupStorageManager.java @@ -55,8 +55,7 @@ public class IncrementalBackupStorageManager { // element does not exist. copy. Files.copy(copySourceFile.toPath(), copyDestination.toPath()); copyCount = copyCount.addWith(new IncCopyResult(1, 1, fileBytes, fileBytes)); - } - { + } else { // element exists (file reused). Just update the stat info copyCount = copyCount.addWith(new IncCopyResult(1, 0, 0, fileBytes)); } -- cgit v1.2.3