Method: Puppet::ModuleTool::Applications::Unpacker.harmonize_ownership
- Defined in:
- lib/puppet/module_tool/applications/unpacker.rb
.harmonize_ownership(source, target) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 23 24 25 |
# File 'lib/puppet/module_tool/applications/unpacker.rb', line 18 def self.harmonize_ownership(source, target) unless Puppet::Util::Platform.windows? source = Pathname.new(source) unless source.respond_to?(:stat) target = Pathname.new(target) unless target.respond_to?(:stat) FileUtils.chown_R(source.stat.uid, source.stat.gid, target) end end |