"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
drime: fix deleted files and directories still being listed with hard_delete
Nick Craig-Wooda2e2b737253f
diff --git a/backend/drime/drime.go b/backend/drime/drime.goindex 1e797cd4e..c56cf9b45 100644--- a/backend/drime/drime.go+++ b/backend/drime/drime.go@@ -692,13 +692,27 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {// deleteObject removes an object by IDfunc (f *Fs) deleteObject(ctx context.Context, id string) error {+ if f.opt.HardDelete {+ // Deleting forever doesn't invalidate the server's cache of+ // the parent folder listing, so the entry keeps being listed+ // for about a second. Moving to the trash first does.+ err := f.deleteEntry(ctx, id, false)+ if err != nil {+ return err+ }+ }+ return f.deleteEntry(ctx, id, f.opt.HardDelete)+}++// deleteEntry moves the entry with ID to the trash or deletes it forever+func (f *Fs) deleteEntry(ctx context.Context, id string, deleteForever bool) error {opts := rest.Opts{Method: "POST",Path: "/file-entries/delete",}request := api.DeleteRequest{EntryIDs: []string{id},- DeleteForever: f.opt.HardDelete,+ DeleteForever: deleteForever,}var result api.DeleteResponseerr := f.pacer.Call(func() (bool, error) {