summaryrefslogtreecommitdiff
path: root/lib/rubygems/package/tar_input.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/package/tar_input.rb12
1 files changed, 5 insertions, 7 deletions
@@ -3,8 +3,6 @@
# See LICENSE.txt for additional licensing information.
#--
-require 'rubygems/package'
-
class Gem::Package::TarInput
include Gem::Package::FSyncDir
@@ -72,9 +70,9 @@ class Gem::Package::TarInput
# map trust policy from string to actual class (or a serialized YAML
# file, if that exists)
if String === security_policy then
- if Gem::Security::Policy.key? security_policy then
# load one of the pre-defined security policies
- security_policy = Gem::Security::Policy[security_policy]
elsif File.exist? security_policy then
# FIXME: this doesn't work yet
security_policy = YAML.load File.read(security_policy)
@@ -136,10 +134,10 @@ class Gem::Package::TarInput
def extract_entry(destdir, entry, expected_md5sum = nil)
if entry.directory? then
- dest = File.join(destdir, entry.full_name)
- if File.dir? dest then
- @fileops.chmod entry.header.mode, dest, :verbose=>false
else
@fileops.mkdir_p dest, :mode => entry.header.mode, :verbose => false
end