"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
pcloud: try harder to delete a failed upload
Nick Craig-Woodbadefdb06082
diff --git a/backend/pcloud/pcloud.go b/backend/pcloud/pcloud.goindex 56df3cf3c..f0ff23797 100644--- a/backend/pcloud/pcloud.go+++ b/backend/pcloud/pcloud.go@@ -1165,10 +1165,14 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op})if err != nil {// sometimes pcloud leaves a half complete file on- // error, so delete it if it exists- delObj, delErr := o.fs.NewObject(ctx, o.remote)- if delErr == nil && delObj != nil {- _ = delObj.Remove(ctx)+ // error, so delete it if it exists, trying a few times+ for i := 0; i < 5; i++ {+ delObj, delErr := o.fs.NewObject(ctx, o.remote)+ if delErr == nil && delObj != nil {+ _ = delObj.Remove(ctx)+ break+ }+ time.Sleep(time.Second)}return err}