Prune directories when excluded
When doing regexp filtering and a directory is matched skip the files
inside that directory as the verbose logging suggests it is doing.
This results in a rather dramatic speed up as one might expect.
@@ -200,6 +200,9 @@ func walkDirectory(toWalk string, blackList []string, extensionLookup map[string
printWarn("skipping file due to match exclude: " + root)
}
}
+ if info.IsDir() {
+ return filepath.SkipDir
+ }
return nil
}
}
