[rubygems/rubygems] Extract entry.full_name to a variable
https://github.com/rubygems/rubygems/commit/3973773005
This commit is contained in:
parent
3944862066
commit
0591780a74
@ -411,15 +411,16 @@ EOM
|
|||||||
directories = []
|
directories = []
|
||||||
open_tar_gz io do |tar|
|
open_tar_gz io do |tar|
|
||||||
tar.each do |entry|
|
tar.each do |entry|
|
||||||
next unless File.fnmatch pattern, entry.full_name, File::FNM_DOTMATCH
|
full_name = entry.full_name
|
||||||
|
next unless File.fnmatch pattern, full_name, File::FNM_DOTMATCH
|
||||||
|
|
||||||
destination = install_location entry.full_name, destination_dir
|
destination = install_location full_name, destination_dir
|
||||||
|
|
||||||
if entry.symlink?
|
if entry.symlink?
|
||||||
link_target = entry.header.linkname
|
link_target = entry.header.linkname
|
||||||
real_destination = link_target.start_with?("/") ? link_target : File.expand_path(link_target, File.dirname(destination))
|
real_destination = link_target.start_with?("/") ? link_target : File.expand_path(link_target, File.dirname(destination))
|
||||||
|
|
||||||
raise Gem::Package::SymlinkError.new(entry.full_name, real_destination, destination_dir) unless
|
raise Gem::Package::SymlinkError.new(full_name, real_destination, destination_dir) unless
|
||||||
normalize_path(real_destination).start_with? normalize_path(destination_dir + "/")
|
normalize_path(real_destination).start_with? normalize_path(destination_dir + "/")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user