diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go index 9855170d2..6c07a3320 100644 --- a/backend/azureblob/azureblob.go +++ b/backend/azureblob/azureblob.go @@ -1088,7 +1088,7 @@ func (f *Fs) list(ctx context.Context, containerName, directory, prefix string, isDirectory := isDirectoryMarker(*file.Properties.ContentLength, file.Metadata, remote) if isDirectory { // Don't insert the root directory - if remote == directory { + if remote == f.opt.Enc.ToStandardPath(directory) { continue } // process directory markers as directories diff --git a/backend/googlecloudstorage/googlecloudstorage.go b/backend/googlecloudstorage/googlecloudstorage.go index 1d1bffaee..07f589ab8 100644 --- a/backend/googlecloudstorage/googlecloudstorage.go +++ b/backend/googlecloudstorage/googlecloudstorage.go @@ -697,7 +697,7 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck // is this a directory marker? if isDirectory { // Don't insert the root directory - if remote == directory { + if remote == f.opt.Enc.ToStandardPath(directory) { continue } // process directory markers as directories diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 6f1ded7f1..40dbf807a 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -4065,7 +4065,7 @@ func (f *Fs) list(ctx context.Context, opt listOpt, fn listFn) error { isDirectory = false } else { // Don't insert the root directory - if remote == opt.directory { + if remote == f.opt.Enc.ToStandardPath(opt.directory) { continue } }