From d8e13d8d85936e88481f9ced6ca2e6e6e3f6d1d0 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Mon, 22 Oct 2018 09:11:15 -0400 Subject: [PATCH] Benchmark may incorrectly list the chunks directory when looking for previous temporary files --- src/duplicacy_gcdstorage.go | 2 +- src/duplicacy_onestorage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duplicacy_gcdstorage.go b/src/duplicacy_gcdstorage.go index c3efc0a4..406dd239 100644 --- a/src/duplicacy_gcdstorage.go +++ b/src/duplicacy_gcdstorage.go @@ -390,7 +390,7 @@ func (storage *GCDStorage) ListFiles(threadIndex int, dir string) ([]string, []i subDirs = append(subDirs, file.Name + "/") } return subDirs, nil, nil - } else if strings.HasPrefix(dir, "snapshots/") { + } else if strings.HasPrefix(dir, "snapshots/") || strings.HasPrefix(dir, "benchmark") { pathID, err := storage.getIDFromPath(threadIndex, dir, false) if err != nil { return nil, nil, err diff --git a/src/duplicacy_onestorage.go b/src/duplicacy_onestorage.go index 769ef24f..dfc8d7b7 100644 --- a/src/duplicacy_onestorage.go +++ b/src/duplicacy_onestorage.go @@ -97,7 +97,7 @@ func (storage *OneDriveStorage) ListFiles(threadIndex int, dir string) ([]string } } return subDirs, nil, nil - } else if strings.HasPrefix(dir, "snapshots/") { + } else if strings.HasPrefix(dir, "snapshots/") || strings.HasPrefix(dir, "benchmark") { entries, err := storage.client.ListEntries(storage.storageDir + "/" + dir) if err != nil { return nil, nil, err