Maybe fixed incorrect total scanned file count displayed when -v is passed

This commit is contained in:
Seednode 2022-11-02 09:10:55 -05:00
parent c13eac975f
commit ea1d8d52c6
2 changed files with 6 additions and 3 deletions

View File

@ -142,9 +142,8 @@ func appendPath(directory, path string, files *Files, stats *Stats) error {
files.Mutex.Lock()
files.List[directory] = append(files.List[directory], path)
files.Mutex.Unlock()
stats.IncrementFilesMatched()
files.Mutex.Unlock()
return nil
}
@ -489,8 +488,12 @@ func pickFile(args []string, filters *Filters, sort string, fileCache *[]string)
)
}
fmt.Printf("Directory count is %v\n", len(files.List))
fileList = prepareDirectories(&files, sort)
fmt.Printf("File count is %v\n", len(fileList))
if Cache {
*fileCache = append(*fileCache, fileList...)
}

View File

@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
)
var Version = "0.20.10"
var Version = "0.21.0"
func init() {
rootCmd.AddCommand(versionCmd)