gcs: Fix Entry doesn't belong in directory "" (same as directory) - ignoring

This change allows directory markers to be non-zero in size.

See: https://forum.rclone.org/t/public-gcs-bucket-and-entry-doesnt-belong-in-directory-same-as-directory/21753/
This commit is contained in:
Nick Craig-Wood 2021-01-19 15:13:52 +00:00
parent 072464cbdb
commit 9b9ab5f3e8

View File

@ -564,7 +564,7 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
remote = path.Join(bucket, remote)
}
// is this a directory marker?
if isDirectory && object.Size == 0 {
if isDirectory {
continue // skip directory marker
}
err = fn(remote, object, false)