Method: Zip::ZipEntry#set_extra_attributes_on_path
- Defined in:
- lib/ruby_archive/handlers/rubyzip/zip/zip.rb
#set_extra_attributes_on_path(destPath) ⇒ Object
:nodoc:
682 683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zip.rb', line 682 def set_extra_attributes_on_path(destPath) # :nodoc: return unless (file? or directory?) case @fstype when FSTYPE_UNIX # BUG: does not update timestamps into account # ignore setuid/setgid bits by default. honor if @restore_ownership unix_perms_mask = 01777 unix_perms_mask = 07777 if (@restore_ownership) FileUtils::chmod(@unix_perms & unix_perms_mask, destPath) if ( && @unix_perms) FileUtils::chown(@unix_uid, @unix_gid, destPath) if (@restore_ownership && @unix_uid && @unix_gid && Process::egid == 0) # File::utimes() end end |