diff options
Diffstat (limited to 'lib/rubygems/remote_fetcher.rb')
-rw-r--r-- | lib/rubygems/remote_fetcher.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb index 32c65eada8..a40ee55273 100644 --- a/lib/rubygems/remote_fetcher.rb +++ b/lib/rubygems/remote_fetcher.rb @@ -173,7 +173,7 @@ class Gem::RemoteFetcher path = source_uri.path path = File.dirname(path) if File.extname(path) == '.gem' - remote_gem_path = correct_for_windows_path(File.join(path, 'gems', gem_file_name)) + remote_gem_path = Gem::Util.correct_for_windows_path(File.join(path, 'gems', gem_file_name)) FileUtils.cp(remote_gem_path, local_gem_path) rescue Errno::EACCES @@ -210,7 +210,7 @@ class Gem::RemoteFetcher # File Fetcher. Dispatched by +fetch_path+. Use it instead. def fetch_file(uri, *_) - Gem.read_binary correct_for_windows_path uri.path + Gem.read_binary Gem::Util.correct_for_windows_path uri.path end ## @@ -317,14 +317,6 @@ class Gem::RemoteFetcher response['content-length'].to_i end - def correct_for_windows_path(path) - if path[0].chr == '/' && path[1].chr =~ /[a-z]/i && path[2].chr == ':' - path[1..-1] - else - path - end - end - ## # Performs a Net::HTTP request of type +request_class+ on +uri+ returning # a Net::HTTP response object. request maintains a table of persistent |