From 70a1eaf91d59eba5014823b5b53f9e31071a56ab Mon Sep 17 00:00:00 2001 From: Seednode Date: Wed, 2 Nov 2022 09:17:07 -0500 Subject: [PATCH] Reverted previous change because the count was actually working fine, I just forgot my test instance was pointing at multiple directories --- cmd/files.go | 7 ++----- cmd/version.go | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/files.go b/cmd/files.go index 8df9419..36430ac 100644 --- a/cmd/files.go +++ b/cmd/files.go @@ -142,9 +142,10 @@ func appendPath(directory, path string, files *Files, stats *Stats) error { files.Mutex.Lock() files.List[directory] = append(files.List[directory], path) - stats.IncrementFilesMatched() files.Mutex.Unlock() + stats.IncrementFilesMatched() + 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) - 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 4009d45..0ca78ee 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.21.0" +var Version = "0.21.1" func init() { rootCmd.AddCommand(versionCmd)