Cleaner: allow non-empty paths to be pruned from cleaning

This commit is contained in:
Adam Vandenberg 2013-01-08 21:27:18 -08:00
parent 1815e6caa1
commit 47dcc3f770

View File

@ -26,7 +26,13 @@ class Cleaner
# We want post-order traversal, so use a stack.
paths = []
f.prefix.find do |path|
paths << path if path.directory?
if path.directory?
if f.skip_clean? path
Find.prune
else
paths << path
end
end
end
paths.each do |d|