Apply normalization to paths before passing to list for index
This commit is contained in:
parent
900b59155b
commit
13440f6a4e
10
cmd/files.go
10
cmd/files.go
|
@ -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
|
||||||
}()
|
}()
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ReleaseVersion string = "2.2.0"
|
ReleaseVersion string = "2.2.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in New Issue