mirror of
https://github.com/rclone/rclone.git
synced 2025-01-11 08:49:37 +01:00
s3: strip trailing / from ListDir()
This commit is contained in:
parent
1660903aa2
commit
125fc8f1f0
3
s3/s3.go
3
s3/s3.go
@ -281,6 +281,9 @@ func (f *FsS3) list(directories bool, fn func(string, *s3.Key)) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
remote := remote[rootLength:]
|
remote := remote[rootLength:]
|
||||||
|
if strings.HasSuffix(remote, "/") {
|
||||||
|
remote = remote[:len(remote)-1]
|
||||||
|
}
|
||||||
fn(remote, &s3.Key{Key: remote})
|
fn(remote, &s3.Key{Key: remote})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user