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

uptobox: fix rmdir declaring that directories weren't empty

Nick Craig-Wood3b6effa81acb
diff --git a/backend/uptobox/uptobox.go b/backend/uptobox/uptobox.go
index 0f7777cc0..29f83187d 100644
--- a/backend/uptobox/uptobox.go
+++ b/backend/uptobox/uptobox.go
@@ -678,7 +678,7 @@ func (f *Fs) Rmdir(ctx context.Context, dir string) error {
if err != nil {
return err
}
- if info.Data.CurrentFolder.FileCount > 0 {
+ if len(info.Data.Folders) > 0 || len(info.Data.Files) > 0 {
return fs.ErrorDirectoryNotEmpty
}