diff --git a/cmd/files.go b/cmd/files.go index 36430ac..8df9419 100644 --- a/cmd/files.go +++ b/cmd/files.go @@ -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...) } diff --git a/cmd/version.go b/cmd/version.go index a7602a4..4009d45 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.20.10" +var Version = "0.21.0" func init() { rootCmd.AddCommand(versionCmd)