Only unlink after a LinkError

This commit is contained in:
Jack Nagel 2014-04-21 09:40:24 -05:00
parent 727f204760
commit b2e8c4e79a

View File

@ -231,12 +231,11 @@ class Keg < Pathname
make_relative_symlink(linked_keg_record, self, mode) make_relative_symlink(linked_keg_record, self, mode)
optlink optlink
end end
rescue LinkError
ObserverPathnameExtension.total
rescue Exception
opoo "Could not link #{fname}. Unlinking..."
unlink unlink
raise raise
else
ObserverPathnameExtension.total
end end
def optlink def optlink