Skip to content

Commit 452c7af

Browse files
committed
Directory should look if the directory exists
1 parent 5458958 commit 452c7af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

chef/lib/chef/provider/directory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def action_create
5050
end
5151

5252
def action_delete
53-
if ::File.exists?(@new_resource.path) && ::File.writable?(@new_resource.path)
53+
if ::File.directory?(@new_resource.path) && ::File.writable?(@new_resource.path)
5454
if @new_resource.recursive == true
5555
Chef::Log.info("Deleting #{@new_resource} recursively at #{@new_resource.path}")
5656
FileUtils.rm_rf(@new_resource.path)

0 commit comments

Comments
 (0)