Don't add directories on recursive scans
This commit is contained in:
parent
05e534fde5
commit
c17aadce55
2
main.go
2
main.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue