1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-04 09:33:36 +00:00

Fix --dry-run not working and add tests for it - fixes #3

This commit is contained in:
Nick Craig-Wood
2014-06-26 15:33:06 +01:00
parent 1d67b014cb
commit 7ebf48ef42
3 changed files with 39 additions and 4 deletions

View File

@@ -178,7 +178,11 @@ func Copier(in ObjectPairChan, fdst Fs, wg *sync.WaitGroup) {
for pair := range in {
src := pair.src
Stats.Transferring(src)
Copy(fdst, pair.dst, src)
if Config.DryRun {
Debug(src, "Not copying as --dry-run")
} else {
Copy(fdst, pair.dst, src)
}
Stats.DoneTransferring(src)
}
}