Only unlink after a LinkError
This commit is contained in:
parent
727f204760
commit
b2e8c4e79a
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user