FIX if dst cannot be deleted, it's an error
This commit is contained in:
parent
0f0f775ea9
commit
8c7b6a947c
@ -26,7 +26,7 @@ class Pathname
|
||||
def rename newname
|
||||
raise unless file?
|
||||
dst=dirname+newname
|
||||
dst.unlink rescue nil
|
||||
dst.unlink if dst.exist?
|
||||
mv dst
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user