mirror of
https://github.com/rclone/rclone.git
synced 2026-10-26 13:28:33 -04:00
operations: remove partials when the copy fails
Before this change we were only removing partials when it was corrupted rather than when the copy just failed.
This commit is contained in:
1 parent
4f8dab8bce
commit
da955e5d4f
1 file changed
+3
@@ -529,6 +529,9 @@ func Copy(ctx context.Context, f fs.Fs, dst fs.Object, remote string, src fs.Obj
|
||||
if err != nil {
|
||||
err = fs.CountError(err)
|
||||
fs.Errorf(src, "Failed to copy: %v", err)
|
||||
if !inplace {
|
||||
removeFailedPartialCopy(ctx, f, remotePartial)
|
||||
}
|
||||
return newDst, err
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user