X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fopen_uri_downloader.rb;h=06c9b3d3b26d9b46ca5b070402bd3f7ce494bbd6;hb=a557fae384ed2c8f8782ed09e5428e2cf701acf6;hp=44ea03776a95cf3da19e0b4e2303a1fa7b5a572b;hpb=e3eeb8df887fc68959ab7d7ebae5c0206b79c230;p=dead%2Fwhatever-dl.git 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()