Cleaner: allow non-empty paths to be pruned from cleaning
This commit is contained in:
parent
1815e6caa1
commit
47dcc3f770
@ -26,7 +26,13 @@ class Cleaner
|
|||||||
# We want post-order traversal, so use a stack.
|
# We want post-order traversal, so use a stack.
|
||||||
paths = []
|
paths = []
|
||||||
f.prefix.find do |path|
|
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
|
end
|
||||||
|
|
||||||
paths.each do |d|
|
paths.each do |d|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user