add returning of SkipDir if a dir should be pruned

This commit is contained in:
TJ Holowaychuk
2017-11-18 17:25:42 -08:00
parent bfa79a2ef4
commit 5ae070e74e
+4
View File
@@ -42,6 +42,10 @@ func (p Pruner) Prune() (*Stats, error) {
return nil
}
if info.IsDir() {
return filepath.SkipDir
}
p.Log.WithField("path", path).Debug("prune")
stats.FilesRemoved++
stats.SizeRemoved += info.Size()