Remove redundant log message
This commit is contained in:
@@ -35,7 +35,6 @@ func (s *ChangeDetector) Scan(ctx context.Context, lastModifiedSince time.Time)
|
|||||||
newMap := make(dirInfoMap)
|
newMap := make(dirInfoMap)
|
||||||
err = s.loadMap(ctx, newMap, s.rootFolder, lastModifiedSince, false)
|
err = s.loadMap(ctx, newMap, s.rootFolder, lastModifiedSince, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error reading folder tree", "folder", s.rootFolder, err)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
changed, deleted, err = s.checkForUpdates(lastModifiedSince, newMap)
|
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) {
|
func (s *ChangeDetector) loadDir(ctx context.Context, dirPath string) (children []string, lastUpdated time.Time, err error) {
|
||||||
dirInfo, err := os.Stat(dirPath)
|
dirInfo, err := os.Stat(dirPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(ctx, "Error stating dir", "path", dirPath)
|
log.Error(ctx, "Error stating dir", "path", dirPath, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
lastUpdated = dirInfo.ModTime()
|
lastUpdated = dirInfo.ModTime()
|
||||||
|
|
||||||
files, err := ioutil.ReadDir(dirPath)
|
files, err := ioutil.ReadDir(dirPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(ctx, "Error reading dir", "path", dirPath)
|
log.Error(ctx, "Error reading dir", "path", dirPath, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
|
|||||||
Reference in New Issue
Block a user