Do not crash on most possibly minor directory enumeration problem.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
6
main.go
6
main.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user