Skip to content

Commit

Permalink
Merge pull request #2 from jarxorg/fix-glob-removeall
Browse files Browse the repository at this point in the history
Fix Glob and RemoveAll
  • Loading branch information
mojatter authored Sep 14, 2023
2 parents 5a691f7 + 30d7e6a commit d100766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (fsys *GCSFS) Glob(pattern string) ([]string, error) {
return nil, err
}

query := newQuery(normalizePrefix(fsys.dir), "", "")
query := newQuery("/", normalizePrefix(fsys.dir), "")
it := c.bucket(fsys.bucket).objects(fsys.Context(), query)

var names []string
Expand Down Expand Up @@ -318,7 +318,7 @@ func (fsys *GCSFS) RemoveAll(dir string) error {

b := c.bucket(fsys.bucket)
ctx := fsys.Context()
query := newQuery(normalizePrefix(fsys.key(dir)), "", "")
query := newQuery("", normalizePrefix(fsys.key(dir)), "")
it := b.objects(fsys.Context(), query)
for {
attrs, err := it.nextAttrs()
Expand Down

0 comments on commit d100766

Please sign in to comment.