Skip to content

Commit

Permalink
Remove redundant log message
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Jul 13, 2020
1 parent 3319f78 commit d4347f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scanner/change_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down

0 comments on commit d4347f2

Please sign in to comment.