From 11953cbcb9fe33afcc8fff46622208523f3930e9 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 29 Feb 2012 01:23:37 +0000 Subject: [PATCH] Remove empty directories during uninstall About time we did this right? --- Library/Homebrew/keg.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index c91f90e170..e4971bc00c 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