Handle reaching the top of a URL which searching for file ext

Should never reach this as most URL's will have a domain name that will
be caught as an extname.
This commit is contained in:
Kevin Abel 2018-01-13 17:06:21 -06:00
parent dca8dc5bf5
commit 0254605cd5
No known key found for this signature in database
GPG Key ID: E0F7636DDDB96BF6

View File

@ -306,6 +306,7 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy
url_pathname = Pathname.new(@url)
until ext = url_pathname.extname[/[^?]+/]
url_pathname = url_pathname.dirname
return if url_pathname.to_s == "."
end
ext
end