"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
filefabric: fix directory move after API change #5734
Nick Craig-Wood257f5d279ae2
diff --git a/backend/filefabric/api/types.go b/backend/filefabric/api/types.goindex 9ba415326..926ad82a6 100644--- a/backend/filefabric/api/types.go+++ b/backend/filefabric/api/types.go@@ -69,11 +69,29 @@ func (i *Int) UnmarshalJSON(data []byte) error {return json.Unmarshal(data, (*int)(i))}+// String represents an string which can be represented in JSON as a+// quoted string or an integer.+type String string++// MarshalJSON turns a String into JSON+func (s *String) MarshalJSON() (out []byte, err error) {+ return json.Marshal((*string)(s))+}++// UnmarshalJSON turns JSON into a String+func (s *String) UnmarshalJSON(data []byte) error {+ err := json.Unmarshal(data, (*string)(s))+ if err != nil {+ *s = String(data)+ }+ return nil+}+// Status return returned in all status responsestype Status struct {Code string `json:"status"`Message string `json:"statusmessage"`- TaskID string `json:"taskid"`+ TaskID String `json:"taskid"`// Warning string `json:"warning"` // obsolete}diff --git a/backend/filefabric/filefabric.go b/backend/filefabric/filefabric.goindex b4b5e8487..61a303a23 100644--- a/backend/filefabric/filefabric.go+++ b/backend/filefabric/filefabric.go@@ -844,7 +844,7 @@ func (f *Fs) Purge(ctx context.Context, dir string) error {}// Wait for the the background task to complete if necessary-func (f *Fs) waitForBackgroundTask(ctx context.Context, taskID string) (err error) {+func (f *Fs) waitForBackgroundTask(ctx context.Context, taskID api.String) (err error) {if taskID == "" || taskID == "0" {// No task to wait forreturn nil