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)
|
||||
optlink
|
||||
end
|
||||
|
||||
ObserverPathnameExtension.total
|
||||
rescue Exception
|
||||
opoo "Could not link #{fname}. Unlinking..."
|
||||
rescue LinkError
|
||||
unlink
|
||||
raise
|
||||
else
|
||||
ObserverPathnameExtension.total
|
||||
end
|
||||
|
||||
def optlink
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user