Check, if file exists. Only delete if exists.

This commit is contained in:
Martin Edenhofer 2013-03-05 17:16:33 +01:00
parent c5c2f9ef2b
commit 381532da45

View file

@ -374,7 +374,9 @@ class Package < ApplicationModel
# install file
puts "NOTICE: uninstall '#{location}'"
File.delete( location )
if File.exist?( location )
File.delete( location )
end
# rename existing file
backup_location = location + '.save'