gcs: ignore directory markers at the root also

See: https://forum.rclone.org/t/issue-with-lsf-r-files-only-first-line-is-blank/15229/
This commit is contained in:
Nick Craig-Wood 2020-03-31 11:44:24 +01:00
parent a5c2f2c138
commit ef99ca68aa

View File

@ -555,7 +555,7 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
continue
}
remote = remote[len(prefix):]
isDirectory := strings.HasSuffix(remote, "/")
isDirectory := remote == "" || strings.HasSuffix(remote, "/")
if addBucket {
remote = path.Join(bucket, remote)
}