8000 s3: fix index out of range error with --fast-list fixes #2388 · devdevmac/rclone@4fe6614 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 4fe6614

Browse files
committed
s3: fix index out of range error with --fast-list fixes rclone#2388
1 parent 4c2fbf9 commit 4fe6614

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/s3/s3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ func (f *Fs) list(dir string, recurse bool, fn listFn) error {
864864
remote := key[rootLength:]
865865
// is this a directory marker?
866866
if (strings.HasSuffix(remote, "/") || remote == "") && *object.Size == 0 {
867-
if recurse {
867+
if recurse && remote != "" {
868868
// add a directory in if --fast-list since will have no prefixes
869869
remote = remote[:len(remote)-1]
870870
err = fn(remote, &s3.Object{Key: &remote}, true)

0 commit comments

Comments
 (0)
0