mirror of
https://github.com/rclone/rclone
synced 2024-12-22 13:03:02 +01:00
yandex: fix listing/deleting files in the root - fixes #2471
Before this change `rclone ls yandex:hello.txt` would fail whereas `rclone ls yandex:/hello.txt` would succeed. Now they both succeed.
This commit is contained in:
parent
6c5ccf26b1
commit
41f709e13b
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user