diff --git a/cmd/files.go b/cmd/files.go index b653cb3..80670dd 100644 --- a/cmd/files.go +++ b/cmd/files.go @@ -250,13 +250,13 @@ func walkPath(path string, fileChannel chan<- string, stats *scanStatsChannels, var skipFiles = false - if files < MinFileCount || files > MaxFileCount { + if files <= MaxFileCount && files >= MinFileCount { + stats.directoriesMatched <- 1 + } else { stats.filesSkipped <- files stats.directoriesSkipped <- 1 skipFiles = true - } else { - stats.directoriesMatched <- 1 } for _, node := range nodes { @@ -270,7 +270,7 @@ func walkPath(path string, fileChannel chan<- string, stats *scanStatsChannels, defer func() { wg.Done() }() - err = walkPath(fullPath, fileChannel, stats, formats) + err := walkPath(fullPath, fileChannel, stats, formats) if err != nil { errorChannel <- err @@ -297,7 +297,7 @@ func walkPath(path string, fileChannel chan<- string, stats *scanStatsChannels, return } - fileChannel <- fullPath + fileChannel <- path stats.filesMatched <- 1 }() diff --git a/cmd/root.go b/cmd/root.go index a4f499a..e148128 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( ) const ( - ReleaseVersion string = "2.2.0" + ReleaseVersion string = "2.2.1" ) var (