mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
Merge RubyGems 2.7.7
see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ecedebab2c
commit
c6da9cadb3
29 changed files with 161 additions and 60 deletions
|
@ -429,6 +429,14 @@ EOM
|
|||
destination
|
||||
end
|
||||
|
||||
def normalize_path(pathname)
|
||||
if Gem.win_platform?
|
||||
pathname.downcase
|
||||
else
|
||||
pathname
|
||||
end
|
||||
end
|
||||
|
||||
def mkdir_p_safe mkdir, mkdir_options, destination_dir, file_name
|
||||
destination_dir = realpath File.expand_path(destination_dir)
|
||||
parts = mkdir.split(File::SEPARATOR)
|
||||
|
@ -437,7 +445,7 @@ EOM
|
|||
path = File.expand_path(path + File::SEPARATOR + basename)
|
||||
lstat = File.lstat path rescue nil
|
||||
if !lstat || !lstat.directory?
|
||||
unless path.start_with? destination_dir and (FileUtils.mkdir path, mkdir_options rescue false)
|
||||
unless normalize_path(path).start_with? normalize_path(destination_dir) and (FileUtils.mkdir path, mkdir_options rescue false)
|
||||
raise Gem::Package::PathError.new(file_name, destination_dir)
|
||||
end
|
||||
end
|
||||
|
@ -591,7 +599,7 @@ EOM
|
|||
end
|
||||
|
||||
case file_name
|
||||
when /^metadata(.gz)?$/ then
|
||||
when "metadata", "metadata.gz" then
|
||||
load_spec entry
|
||||
when 'data.tar.gz' then
|
||||
verify_gz entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue