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

yandex: fix listing/deleting files in the root - fixes #2471

Nick Craig-Wood41f709e13b6b
diff --git a/backend/yandex/yandex.go b/backend/yandex/yandex.go
index aa6cad2d0..0979c4e68 100644
--- a/backend/yandex/yandex.go
+++ b/backend/yandex/yandex.go
@@ -165,7 +165,11 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
//return err
} else {
if ResourceInfoResponse.ResourceType == "file" {
- f.setRoot(path.Dir(root))
+ rootDir := path.Dir(root)
+ if rootDir == "." {
+ rootDir = ""
+ }
+ f.setRoot(rootDir)
// return an error with an fs which points to the parent
return f, fs.ErrorIsFile
}