aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-02-29 01:23:37 +0000
committerMax Howell2012-02-29 01:23:49 +0000
commit9092b0690e643ec04af7c10efd9647c60b841936 (patch)
tree616adf01a10e507c8228a10a3a9931ed9302ea53 /Library
parent6ad2c00d986c2f4993df653aa363d58ead8452db (diff)
downloadhomebrew-9092b0690e643ec04af7c10efd9647c60b841936.tar.bz2
Remove empty directories during uninstall
About time we did this right?
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index c91f90e17..e4971bc00 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -35,6 +35,7 @@ class Keg < Pathname
next unless dst.symlink?
dst.uninstall_info if dst.to_s =~ INFOFILE_RX and ENV['HOMEBREW_KEEP_INFO']
dst.unlink
+ dst.parent.rmdir_if_possible
n+=1
Find.prune if src.directory?
end