Skip to content

Commit

Permalink
Add missing call to checkFile fn in DownloadAll
Browse files Browse the repository at this point in the history
  • Loading branch information
irees committed Jan 22, 2025
1 parent fcb117b commit 3838dbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions request/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ func DownloadAll(ctx context.Context, r Store, outDir string, prefix string, che
}
var ret []string
for _, key := range keys {
if checkFile != nil && !checkFile(key) {
continue
}
outfn := filepath.Join(outDir, stripDir(prefix, key))
if _, err := mkdir(filepath.Dir(outfn), ""); err != nil {
return nil, err
Expand Down Expand Up @@ -139,9 +142,6 @@ func mkdir(basePath string, path string) (string, error) {
}

func findFiles(srcDir string, checkFile func(string) bool) ([]string, error) {
if checkFile == nil {
checkFile = func(string) bool { return true }
}
var ret []string
if err := filepath.Walk(srcDir, func(path string, info fs.FileInfo, err error) error {
if info == nil {
Expand Down

0 comments on commit 3838dbe

Please sign in to comment.