Apply normalization to paths before passing to list for index

This commit is contained in:
Seednode 2023-10-03 09:28:00 -05:00
parent 900b59155b
commit 13440f6a4e
2 changed files with 6 additions and 6 deletions

View File

@ -250,13 +250,13 @@ func walkPath(path string, fileChannel chan<- string, stats *scanStatsChannels,
var skipFiles = false var skipFiles = false
if files < MinFileCount || files > MaxFileCount { if files <= MaxFileCount && files >= MinFileCount {
stats.directoriesMatched <- 1
} else {
stats.filesSkipped <- files stats.filesSkipped <- files
stats.directoriesSkipped <- 1 stats.directoriesSkipped <- 1
skipFiles = true skipFiles = true
} else {
stats.directoriesMatched <- 1
} }
for _, node := range nodes { for _, node := range nodes {
@ -270,7 +270,7 @@ func walkPath(path string, fileChannel chan<- string, stats *scanStatsChannels,
defer func() { defer func() {
wg.Done() wg.Done()
}() }()
err = walkPath(fullPath, fileChannel, stats, formats) err := walkPath(fullPath, fileChannel, stats, formats)
if err != nil { if err != nil {
errorChannel <- err errorChannel <- err
@ -297,7 +297,7 @@ func walkPath(path string, fileChannel chan<- string, stats *scanStatsChannels,
return return
} }
fileChannel <- fullPath fileChannel <- path
stats.filesMatched <- 1 stats.filesMatched <- 1
}() }()

View File

@ -12,7 +12,7 @@ import (
) )
const ( const (
ReleaseVersion string = "2.2.0" ReleaseVersion string = "2.2.1"
) )
var ( var (