summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-16 04:31:31 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-16 04:31:31 +0000
commit36ecd73133f43b336ace7943ad1c91c3ce4ef9ad (patch)
tree23d7fc0082e2e39590c67db849b689e9717e6021 /lib/rubygems
parentaf4907c54f5f356d94c9c0ba53539487f8118659 (diff)
* lib/rubygems/package.rb: Fixed potential perms issue unpacking of
gems on NFS. [Backport #12579] * lib/rubygems.rb: bump version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/package.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb
index 417b34b79f..e8b8b38b06 100644
--- a/lib/rubygems/package.rb
+++ b/lib/rubygems/package.rb
@@ -366,8 +366,9 @@ EOM
FileUtils.mkdir_p mkdir, mkdir_options
- open destination, 'wb', entry.header.mode do |out|
+ open destination, 'wb' do |out|
out.write entry.read
+ FileUtils.chmod entry.header.mode, destination
end if entry.file?
verbose destination