lib/oddb2xml/util.rb in oddb2xml-1.6.6 vs lib/oddb2xml/util.rb in oddb2xml-1.6.7

- old
+ new

@@ -14,17 +14,17 @@ return true end false end - def Oddb2xml.download_finished(file) + def Oddb2xml.download_finished(file, remove_file = true) dest = "#{Backup}/#{File.basename(file)}" if @options[:skip_download] FileUtils.makedirs(Backup) FileUtils.cp(file, dest, :verbose => false) end begin - File.unlink(file) if File.exists?(file) + File.unlink(file) if File.exists?(file) and remove_file rescue Errno::EACCES # Permission Denied on Windows end end end