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

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.
This commit is contained in:
Gilbert Chen
2024-10-29 21:04:51 -04:00
parent 69f5d2f7bf
commit a06d925e53

View File

@@ -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)