Skip to content

Commit

Permalink
[Gitdl]: fix download ignore return and stop all
Browse files Browse the repository at this point in the history
  • Loading branch information
4lxprime committed Jun 20, 2024
1 parent 2dac334 commit 2e04094
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gitdl.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func downloadFolder(gitRepo, gitPath, localPath string, opts *Options) error {
// if filepath does match any exclude pattern, we'll just return
ignore := gitignore.CompileIgnoreLines(opts.excludesFiles...)
if ok := ignore.MatchesPath(localItemPath); ok {
return nil
continue
}

switch itemType {
Expand All @@ -189,12 +189,14 @@ func downloadFolder(gitRepo, gitPath, localPath string, opts *Options) error {
return err
}

downloadFolder(
if err := downloadFolder( // reccursive download
gitRepo,
itemPath, // next path to download
localItemPath,
opts,
) // reccursive download
); err != nil {
return err
}

case "file":
fileURL := fmt.Sprintf(
Expand Down

0 comments on commit 2e04094

Please sign in to comment.