1
mirror of https://github.com/rclone/rclone synced 2024-10-03 09:57:50 +02:00

s3: strip trailing / from ListDir()

This commit is contained in:
Nick Craig-Wood 2014-07-24 23:01:04 +01:00
parent 1660903aa2
commit 125fc8f1f0

View File

@ -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 {