dont yield dirs

master
bel 2023-11-06 21:39:57 -07:00
parent 550bace88d
commit 72fee73a00
1 changed files with 7 additions and 1 deletions

View File

@ -79,7 +79,13 @@ func (config config) targets() ([]string, error) {
if err != nil {
return nil, err
}
result = append(result, results...)
for i := range results {
if stat, err := os.Stat(results[i]); err != nil {
return nil, err
} else if !stat.IsDir() {
result = append(result, results[i])
}
}
}
if len(result) == 0 {