Do not crash on most possibly minor directory enumeration problem.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-03-20 10:43:48 +01:00
parent 14edc104e9
commit cc2dfe234f

View File

@@ -31,7 +31,7 @@ var (
junkCounter byte = 0 // to prevent any compiler optimizations
)
var version = "1.0"
var version = "1.1"
type volume struct {
path string
@@ -282,7 +282,9 @@ func processVolume(volume *volume, onlyStats bool, stats *lockStats) error {
dir.dir.Close()
continue
} else if err != nil {
return err
log.WithFields(log.Fields{"Directory": dir.path, "Error": err}).Warn("Failed to enumerate directory. Skipping.")
dir.dir.Close()
continue
}
dir.entriesBatch = names
}