mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 09:54:44 +01: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:
parent
4f8dab8bce
commit
da955e5d4f
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user