1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-15 07:43:21 +00:00

Don't create extra directories on --dry-run

This commit is contained in:
niknah
2017-09-14 14:20:58 +10:00
parent 491252e3e4
commit 03c2a190ee

View File

@@ -600,9 +600,11 @@ func (manager *SnapshotManager) ListAllFiles(storage Storage, top string) (allFi
if len(files) > 1024 && !storage.IsFastListing() { if len(files) > 1024 && !storage.IsFastListing() {
for i := 0; i < 256; i++ { for i := 0; i < 256; i++ {
subdir := dir + fmt.Sprintf("%02x\n", i) subdir := dir + fmt.Sprintf("%02x\n", i)
if !manager.config.dryRun {
manager.storage.CreateDirectory(0, subdir) manager.storage.CreateDirectory(0, subdir)
} }
} }
}
} else { } else {
// Remove chunk sub-directories that are empty // Remove chunk sub-directories that are empty
if len(files) == 0 && strings.HasPrefix(dir, "chunks/") && dir != "chunks/" { if len(files) == 0 && strings.HasPrefix(dir, "chunks/") && dir != "chunks/" {