Add root dirname as a escape value too

This commit is contained in:
Kevin Abel 2018-02-02 18:15:05 -06:00
parent 0254605cd5
commit 601af55b43
No known key found for this signature in database
GPG Key ID: E0F7636DDDB96BF6

View File

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