Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

webdav: Attempt to remove failed uploads

Nick Craig-Woodeb84b58d3c72
diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go
index 9aed51139..25721a9c2 100644
--- a/backend/webdav/webdav.go
+++ b/backend/webdav/webdav.go
@@ -968,6 +968,8 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
return shouldRetry(resp, err)
})
if err != nil {
+ // Remove failed upload
+ _ = o.Remove()
return err
}
// read metadata from remote