summaryrefslogtreecommitdiff
path: root/lib/rubygems/package.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2022-08-02 11:25:51 +0200
committergit <[email protected]>2022-08-04 13:36:44 +0900
commit0591780a74f9893038d5d794a958621189953e8a ()
treec4a6509742a66549ad78ee344738743413323195 /lib/rubygems/package.rb
parent394486206603f701ac756cd0cc0c0f642152e035 (diff)
[rubygems/rubygems] Extract entry.full_name to a variable
https://.com/rubygems/rubygems/commit/3973773005
-rw-r--r--lib/rubygems/package.rb7
1 files changed, 4 insertions, 3 deletions
@@ -411,15 +411,16 @@ EOM
directories = []
open_tar_gz io do |tar|
tar.each do |entry|
- next unless File.fnmatch pattern, entry.full_name, File::FNM_DOTMATCH
- destination = install_location entry.full_name, destination_dir
if entry.symlink?
link_target = entry.header.linkname
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
normalize_path(real_destination).start_with? normalize_path(destination_dir + "/")
end