From 601af55b43bc96627359eca06eeec4bf9881c890 Mon Sep 17 00:00:00 2001 From: Kevin Abel Date: Fri, 2 Feb 2018 18:15:05 -0600 Subject: [PATCH] Add root dirname as a escape value too --- Library/Homebrew/download_strategy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 2774f2fadb..ed316fa7fb 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -306,7 +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 == "." + return if url_pathname.to_s == "." || url_pathname.to_s == "/" end ext end