Reverted previous change because the count was actually working fine, I just forgot my test instance was pointing at multiple directories
This commit is contained in:
parent
ea1d8d52c6
commit
70a1eaf91d
|
@ -142,9 +142,10 @@ func appendPath(directory, path string, files *Files, stats *Stats) error {
|
||||||
|
|
||||||
files.Mutex.Lock()
|
files.Mutex.Lock()
|
||||||
files.List[directory] = append(files.List[directory], path)
|
files.List[directory] = append(files.List[directory], path)
|
||||||
stats.IncrementFilesMatched()
|
|
||||||
files.Mutex.Unlock()
|
files.Mutex.Unlock()
|
||||||
|
|
||||||
|
stats.IncrementFilesMatched()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,12 +489,8 @@ func pickFile(args []string, filters *Filters, sort string, fileCache *[]string)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("Directory count is %v\n", len(files.List))
|
|
||||||
|
|
||||||
fileList = prepareDirectories(&files, sort)
|
fileList = prepareDirectories(&files, sort)
|
||||||
|
|
||||||
fmt.Printf("File count is %v\n", len(fileList))
|
|
||||||
|
|
||||||
if Cache {
|
if Cache {
|
||||||
*fileCache = append(*fileCache, fileList...)
|
*fileCache = append(*fileCache, fileList...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "0.21.0"
|
var Version = "0.21.1"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(versionCmd)
|
rootCmd.AddCommand(versionCmd)
|
||||||
|
|
Loading…
Reference in New Issue