diff options
-rw-r--r-- | lib/chef/chef_fs/file_system.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/file_system.rb b/lib/chef/chef_fs/file_system.rb index 5c4278c100..de3efb4b82 100644 --- a/lib/chef/chef_fs/file_system.rb +++ b/lib/chef/chef_fs/file_system.rb @@ -288,6 +288,8 @@ class Chef else begin dest_entry.delete(true) + # if this is a node or client, delete associated ACLs (user ACLs handled elsewhere) + ::File.delete "#{dest_entry.parent.file_path}/../acls#{dest_path}" if ['/nodes', '/clients'].include? Pathname.new(dest_path).parent.to_s ui.output "Deleted extra entry #{dest_path} (purge is on)" if ui rescue Chef::ChefFS::FileSystem::NotFoundError ui.output "Entry #{dest_path} does not exist. Nothing to do. (purge is on)" if ui |