Stop removing failed upload to cloud storage remotes - fixes #559

We do remove a partially written file on local so we don't have
corrupted files lying around.
This commit is contained in:
Nick Craig-Wood 2016-11-04 17:06:56 +00:00
parent 154e91bb23
commit 441951a93b
16 changed files with 54 additions and 11 deletions

View file

@ -265,11 +265,6 @@ func Copy(f Fs, dst, src Object) (err error) {
// Retry if err returned a retry error
if IsRetryError(err) || ShouldRetry(err) {
Debug(src, "Received error: %v - low level retry %d/%d", err, tries, maxTries)
if removeFailedCopy(dst) {
// If we removed dst, then nil it out and note we are not updating
dst = nil
doUpdate = false
}
continue
}
// otherwise finish
@ -278,7 +273,6 @@ func Copy(f Fs, dst, src Object) (err error) {
if err != nil {
Stats.Error()
ErrorLog(src, "Failed to copy: %v", err)
removeFailedCopy(dst)
return err
}