1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

fs: move with --ignore-existing will not delete skipped files - #5463

This commit is contained in:
Nathan Collins
2021-07-29 12:42:55 -04:00
committed by Nick Craig-Wood
parent 3d9da896d2
commit c32d5dd1f3
5 changed files with 96 additions and 1 deletions

View File

@@ -1811,7 +1811,11 @@ func moveOrCopyFile(ctx context.Context, fdst fs.Fs, fsrc fs.Fs, dstFileName str
} else {
tr := accounting.Stats(ctx).NewCheckingTransfer(srcObj)
if !cp {
err = DeleteFile(ctx, srcObj)
if ci.IgnoreExisting {
fs.Debugf(srcObj, "Not removing source file as destination file exists and --ignore-existing is set")
} else {
err = DeleteFile(ctx, srcObj)
}
}
tr.Done(ctx, err)
}