Fix nil check in rejectBySize

This commit is contained in:
yoshiera
2020-09-21 16:08:00 +08:00
parent 1cfb01a8a6
commit 3cf29a777d
2 changed files with 11 additions and 0 deletions

View File

@@ -301,6 +301,10 @@ func rejectBySize(maxSizeStr string) (RejectFunc, error) {
}
return func(item string, fi os.FileInfo) bool {
if fi == nil {
return false
}
// directory will be ignored
if fi.IsDir() {
return false