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:
parent
dca8dc5bf5
commit
0254605cd5
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user