diff --git a/oss/gcsblob/gcs.go b/oss/gcsblob/gcs.go index 0d8a531..6cbf082 100644 --- a/oss/gcsblob/gcs.go +++ b/oss/gcsblob/gcs.go @@ -104,6 +104,9 @@ func (g *GoogleCloudStorage) State(key string) (oss.OSSState, error) { } func (g *GoogleCloudStorage) List(prefix string) ([]oss.OSSPath, error) { + if !strings.HasSuffix(prefix, "/") { + prefix = prefix + "/" + } ctx := context.Background() it := g.client.Bucket(g.bucket).Objects(ctx, &storage.Query{ Prefix: prefix,