fix: skip if fileInfo is nil
This commit is contained in:
parent
94ca2169a2
commit
faf32dd21a
3
main.go
3
main.go
@ -100,6 +100,9 @@ func removeSuffix(suffix string) filepath.WalkFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func normalize(p string, f os.FileInfo, err error) error {
|
func normalize(p string, f os.FileInfo, err error) error {
|
||||||
|
if f == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
filename := f.Name()
|
filename := f.Name()
|
||||||
if skip, err := skipDir(filename); skip {
|
if skip, err := skipDir(filename); skip {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user