1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

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.
This commit is contained in:
Gilbert Chen
2024-07-25 22:54:19 -04:00
parent d182708eb5
commit 69f5d2f7bf

View File

@@ -381,7 +381,7 @@ func (manager *BackupManager) Backup(top string, quickMode bool, threads int, ta
} }
var once sync.Once 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 // In case an error occurs during a hash mode backup, save the incomplete snapshot
RunAtError = func() { RunAtError = func() {
once.Do(func() { once.Do(func() {