We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5458958 commit 452c7afCopy full SHA for 452c7af
1 file changed
chef/lib/chef/provider/directory.rb
@@ -50,7 +50,7 @@ def action_create
50
end
51
52
def action_delete
53
- if ::File.exists?(@new_resource.path) && ::File.writable?(@new_resource.path)
+ if ::File.directory?(@new_resource.path) && ::File.writable?(@new_resource.path)
54
if @new_resource.recursive == true
55
Chef::Log.info("Deleting #{@new_resource} recursively at #{@new_resource.path}")
56
FileUtils.rm_rf(@new_resource.path)
0 commit comments