forked from TrueCloudLab/rclone
s3: strip trailing / from ListDir()
This commit is contained in:
parent
1660903aa2
commit
125fc8f1f0
1 changed files with 3 additions and 0 deletions
3
s3/s3.go
3
s3/s3.go
|
@ -281,6 +281,9 @@ func (f *FsS3) list(directories bool, fn func(string, *s3.Key)) {
|
|||
continue
|
||||
}
|
||||
remote := remote[rootLength:]
|
||||
if strings.HasSuffix(remote, "/") {
|
||||
remote = remote[:len(remote)-1]
|
||||
}
|
||||
fn(remote, &s3.Key{Key: remote})
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue