mirror of
https://github.com/rclone/rclone
synced 2024-11-23 00:06:55 +01:00
swift: return directories without / in ListDir
This commit is contained in:
parent
a5b0d88608
commit
b013c58537
@ -201,8 +201,11 @@ func (f *FsSwift) list(directories bool, fn func(string, *swift.Object)) {
|
||||
for i := range objects {
|
||||
object := &objects[i]
|
||||
// FIXME if there are no directories, swift gives back the files for some reason!
|
||||
if directories && !strings.HasSuffix(object.Name, "/") {
|
||||
continue
|
||||
if directories {
|
||||
if !strings.HasSuffix(object.Name, "/") {
|
||||
continue
|
||||
}
|
||||
object.Name = object.Name[:len(object.Name)-1]
|
||||
}
|
||||
if !strings.HasPrefix(object.Name, f.root) {
|
||||
fs.Log(f, "Odd name received %q", object.Name)
|
||||
|
Loading…
Reference in New Issue
Block a user