Don't add directories on recursive scans

This commit is contained in:
Your Name 2022-02-02 15:49:49 -05:00
parent 05e534fde5
commit c17aadce55
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ func main() {
} else {
filepath.WalkDir(c.StartingPath, func(path string, d fs.DirEntry, err error) error {
ext := strings.ToLower(filepath.Ext(path))
if c.IgnoreSuffix || ext == ".jpg" || ext == ".jpeg" {
if !d.IsDir() && (c.IgnoreSuffix || ext == ".jpg" || ext == ".jpeg") {
filelist = append(filelist, path)
}
return nil