mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 07:29:35 +01:00
s3: ignore zero length directory markers at the root too
This commit is contained in:
parent
4f6f07c074
commit
e9a2cbec37
@ -550,7 +550,7 @@ func (f *Fs) list(dir string, recurse bool, fn listFn) error {
|
||||
}
|
||||
remote := key[rootLength:]
|
||||
// is this a directory marker?
|
||||
if strings.HasSuffix(remote, "/") && *object.Size == 0 {
|
||||
if (strings.HasSuffix(remote, "/") || remote == "") && *object.Size == 0 {
|
||||
if recurse {
|
||||
// add a directory in if --fast-list since will have no prefixes
|
||||
remote = remote[:len(remote)-1]
|
||||
|
Loading…
Reference in New Issue
Block a user