forked from TrueCloudLab/rclone
gcs: ignore zero length directory markers at the root too
This commit is contained in:
parent
e9a2cbec37
commit
5ba5be9b37
1 changed files with 1 additions and 1 deletions
|
@ -438,7 +438,7 @@ func (f *Fs) list(dir string, recurse bool, fn listFn) error {
|
||||||
}
|
}
|
||||||
remote := object.Name[rootLength:]
|
remote := object.Name[rootLength:]
|
||||||
// is this a directory marker?
|
// is this a directory marker?
|
||||||
if strings.HasSuffix(remote, "/") && object.Size == 0 {
|
if (strings.HasSuffix(remote, "/") || remote == "") && object.Size == 0 {
|
||||||
if recurse {
|
if recurse {
|
||||||
// add a directory in if --fast-list since will have no prefixes
|
// add a directory in if --fast-list since will have no prefixes
|
||||||
err = fn(remote[:len(remote)-1], object, true)
|
err = fn(remote[:len(remote)-1], object, true)
|
||||||
|
|
Loading…
Reference in a new issue