From 7f834e84f6b5129beb8f99cd9228d84eb528f956 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Fri, 9 Oct 2020 14:22:45 -0400 Subject: [PATCH] Don't attemp to load verified_chunks when it doesn't exist. --- src/duplicacy_snapshotmanager.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/duplicacy_snapshotmanager.go b/src/duplicacy_snapshotmanager.go index 4909dc6e..f033fc32 100644 --- a/src/duplicacy_snapshotmanager.go +++ b/src/duplicacy_snapshotmanager.go @@ -1030,8 +1030,10 @@ func (manager *SnapshotManager) CheckSnapshots(snapshotID string, revisionsToChe manager.fileChunk.Reset(false) err = manager.snapshotCache.DownloadFile(0, verifiedChunksFile, manager.fileChunk) - if err != nil && !os.IsNotExist(err) { - LOG_WARN("SNAPSHOT_VERIFY", "Failed to load the file containing verified chunks: %v", err) + if err != nil { + if !os.IsNotExist(err) { + LOG_WARN("SNAPSHOT_VERIFY", "Failed to load the file containing verified chunks: %v", err) + } } else { err = json.Unmarshal(manager.fileChunk.GetBytes(), &verifiedChunks) if err != nil {