FIX if dst cannot be deleted, it's an error

This commit is contained in:
Max Howell 2009-08-10 23:40:27 +01:00
parent 0f0f775ea9
commit 8c7b6a947c

View File

@ -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