From 8916217652d105eec96c6e298274705f95902226 Mon Sep 17 00:00:00 2001 From: Fry Date: Wed, 27 Nov 2024 15:04:14 +1100 Subject: [PATCH] Check error before opening file --- tools/fraken/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/fraken/main.go b/tools/fraken/main.go index 92974c199..9bd98c3e2 100644 --- a/tools/fraken/main.go +++ b/tools/fraken/main.go @@ -351,6 +351,10 @@ func filesystemScan(wait chan struct{}, c chan *Detection, minimumScore int) { } var wg sync.WaitGroup err := filepath.Walk(*scanPathFlag, func(filePath string, fileInfo os.FileInfo, err error) error { + if err != nil { + log.Printf("Error walking dir %v: %v\n", filePath, err) + return err + } if !fileInfo.Mode().IsRegular() { return nil }