summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@opscode.com>2021-06-23 09:01:31 -0700
committerGitHub <noreply@github.com>2021-06-23 09:01:31 -0700
commita4585799859f25bc3fcb3cc0019b216a488f8cb9 (patch)
tree63da18d3e4ad645f96e1b4e3b503a3173f140120 /lib
parent6cb1013e65df1d92e35134bf50fd78871ccd95e0 (diff)
parentaeb27a1fa59225e4a42e72d02fdcc57e6a8f8cc6 (diff)
downloadchef-a4585799859f25bc3fcb3cc0019b216a488f8cb9.tar.gz
Merge pull request #11726 from chef/lcg/file-provider-file-exists
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/provider/file.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb
index 59724a8340..96f6eef061 100644
--- a/lib/chef/provider/file.rb
+++ b/lib/chef/provider/file.rb
@@ -157,7 +157,7 @@ class Chef
end
action :delete do
- if ::File.exists?(new_resource.path)
+ if ::File.exist?(new_resource.path)
converge_by("delete file #{new_resource.path}") do
do_backup unless file_class.symlink?(new_resource.path)
::File.delete(new_resource.path)
@@ -393,7 +393,7 @@ class Chef
# a nil tempfile is okay, means the resource has no content or no new content
return if tempfile.nil?
# but a tempfile that has no path or doesn't exist should not happen
- if tempfile.path.nil? || !::File.exists?(tempfile.path)
+ if tempfile.path.nil? || !::File.exist?(tempfile.path)
raise "#{ChefUtils::Dist::Infra::CLIENT} is confused, trying to deploy a file that has no path or does not exist..."
end