From d4347f20aef9fd97db1af4d5a349387f386268f1 Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 12 Jul 2020 20:42:38 -0400 Subject: [PATCH] Remove redundant log message --- scanner/change_detector.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scanner/change_detector.go b/scanner/change_detector.go index 32d58538..668ccecf 100644 --- a/scanner/change_detector.go +++ b/scanner/change_detector.go @@ -35,7 +35,6 @@ func (s *ChangeDetector) Scan(ctx context.Context, lastModifiedSince time.Time) newMap := make(dirInfoMap) err = s.loadMap(ctx, newMap, s.rootFolder, lastModifiedSince, false) if err != nil { - log.Error("Error reading folder tree", "folder", s.rootFolder, err) return } changed, deleted, err = s.checkForUpdates(lastModifiedSince, newMap) @@ -52,14 +51,14 @@ func (s *ChangeDetector) Scan(ctx context.Context, lastModifiedSince time.Time) func (s *ChangeDetector) loadDir(ctx context.Context, dirPath string) (children []string, lastUpdated time.Time, err error) { dirInfo, err := os.Stat(dirPath) if err != nil { - log.Error(ctx, "Error stating dir", "path", dirPath) + log.Error(ctx, "Error stating dir", "path", dirPath, err) return } lastUpdated = dirInfo.ModTime() files, err := ioutil.ReadDir(dirPath) if err != nil { - log.Error(ctx, "Error reading dir", "path", dirPath) + log.Error(ctx, "Error reading dir", "path", dirPath, err) return } for _, f := range files {