aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-01-08 21:27:18 -0800
committerAdam Vandenberg2013-01-08 21:27:30 -0800
commit47dcc3f770b150548e9be0349a817716e9d19fa1 (patch)
tree6152bb0f5084d4a8f728fe52d9cdc056e42bbd7e /Library
parent1815e6caa1bed5dfbadc8609d1b62921484f5d98 (diff)
downloadbrew-47dcc3f770b150548e9be0349a817716e9d19fa1.tar.bz2
Cleaner: allow non-empty paths to be pruned from cleaning
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cleaner.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb
index 7fd116a90..2d9ce516b 100644
--- a/Library/Homebrew/cleaner.rb
+++ b/Library/Homebrew/cleaner.rb
@@ -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|