mirror of
https://github.com/JaCoB1123/dupe-finder.git
synced 2026-11-12 23:11:02 +01:00
fix: panic on nil info
This commit is contained in:
1 parent
a7ef9d8726
commit
75c6516be6
1 file changed
+5
@@ -125,6 +125,11 @@ func (fm *FilesMap) WalkDirectories() int64 {
|
|||||||
sumSize := int64(0)
|
sumSize := int64(0)
|
||||||
for _, path := range flag.Args() {
|
for _, path := range flag.Args() {
|
||||||
filepath.Walk(path, func(path string, info os.FileInfo, err error) error {
|
filepath.Walk(path, func(path string, info os.FileInfo, err error) error {
|
||||||
|
if err != nil || info == nil {
|
||||||
|
fmt.Printf("WARN: got %s for %s", err.Error(), path)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user