From 69f5d2f7bf04e8eedb684dbd660be38332c0f08d Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Thu, 25 Jul 2024 22:54:19 -0400 Subject: [PATCH] Don't save the incomplete snapshot for a dry run Saving the incomple snapshot would trick the next backup into thinking that all chunks have been uploaded. --- src/duplicacy_backupmanager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duplicacy_backupmanager.go b/src/duplicacy_backupmanager.go index 69fc59d..15a1fc7 100644 --- a/src/duplicacy_backupmanager.go +++ b/src/duplicacy_backupmanager.go @@ -381,7 +381,7 @@ func (manager *BackupManager) Backup(top string, quickMode bool, threads int, ta } var once sync.Once - if hashMode { + if hashMode && !manager.config.dryRun { // In case an error occurs during a hash mode backup, save the incomplete snapshot RunAtError = func() { once.Do(func() {