From a06d925e538cf41438a8e5a8d0dbde413ab1ea11 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Tue, 29 Oct 2024 21:04:51 -0400 Subject: [PATCH] Remove 'incomplete_files' in deleteIncompleteSnapshot() This file is used for storing the on-disk entry list. When an error occurs, this file is renamed to 'incomplete_snapshot' for fast resuming on next run. But if there is no error this file should be removed. --- src/duplicacy_entrylist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duplicacy_entrylist.go b/src/duplicacy_entrylist.go index 6f21a5f..4f3e4ad 100644 --- a/src/duplicacy_entrylist.go +++ b/src/duplicacy_entrylist.go @@ -559,7 +559,7 @@ func loadIncompleteSnapshot(snapshotID string, cachePath string) *EntryList { // Delete the two incomplete files. func deleteIncompleteSnapshot(cachePath string) { - for _, file := range []string{"incomplete_snapshot", "incomplete_chunks"} { + for _, file := range []string{"incomplete_snapshot", "incomplete_chunks", "incomplete_files"} { filePath := path.Join(cachePath, file) if _, err := os.Stat(filePath); err == nil { err = os.Remove(filePath)