X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=src%2Fopen_uri_downloader.rb;h=06c9b3d3b26d9b46ca5b070402bd3f7ce494bbd6;hp=44ea03776a95cf3da19e0b4e2303a1fa7b5a572b;hb=9a5310260a276a57c084d07de2bb97d78ce2a8ff;hpb=6e9cec676f28db2fe9fd5872bc0ec7ebb954f5f6 diff --git a/src/open_uri_downloader.rb b/src/open_uri_downloader.rb index 44ea037..06c9b3d 100644 --- a/src/open_uri_downloader.rb +++ b/src/open_uri_downloader.rb @@ -20,7 +20,11 @@ require 'src/uri_utilities' class OpenUriDownloader < Downloader - def download(url, outfile) + def download(url, outfile, continue=false) + if File.exists?(outfile) + raise IOError.new("Output file already exists. Please remove #{outfile}, and try again.") + end + uri = URI.parse(url) uu = UriUtilities.new()