aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2012-07-29 10:19:27 -0300
committerMisty De Meo2012-07-29 10:28:41 -0300
commit3822267d2c9981192b909a1fb74d997f536cb579 (patch)
tree2f14bd039cafdeda5d1fe9d3f3d88a7b38132ac0 /Library
parentd701a59a688f805e4685a22f12c415d592ff2627 (diff)
downloadbrew-3822267d2c9981192b909a1fb74d997f536cb579.tar.bz2
Synchronize Keg#link and #unlink counts
Keg#link would sometimes count a linked file when doing mkpath, even if the target directory already exists; #unlink would never count it. This meant that "brew ln" and "brew unlink" counts for the same keg could be out of sync with each other.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 946ea0d49..14d902880 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -442,6 +442,7 @@ module ObserverPathnameExtension
$d+=1
end
def mkpath
+ return if exist?
super
puts "mkpath #{to_s}" if ARGV.verbose?
$d+=1