summaryrefslogtreecommitdiff
path: root/lib/chef/file_access_control
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-11-21 21:34:19 -0800
committerTim Smith <tsmith84@gmail.com>2020-11-27 15:04:01 -0800
commit6b2f219f13b7d28ee9277f98bf11e69903fefc92 (patch)
treece287b5e1e9674c6a2db05ecd712c2493cb6a450 /lib/chef/file_access_control
parent8bd0da60b8b5867566b4a2fbf339c7c97eb8bd6a (diff)
downloadchef-exists.tar.gz
Convert the last our of File.exists? to File.exist?exists
Standardize on the new method Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/file_access_control')
-rw-r--r--lib/chef/file_access_control/windows.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/file_access_control/windows.rb b/lib/chef/file_access_control/windows.rb
index cc1b96a84d..744c5f7466 100644
--- a/lib/chef/file_access_control/windows.rb
+++ b/lib/chef/file_access_control/windows.rb
@@ -33,7 +33,7 @@ class Chef
module ClassMethods
# We want to mix these in as class methods
def writable?(path)
- ::File.exists?(path) && Chef::ReservedNames::Win32::File.file_access_check(
+ ::File.exist?(path) && Chef::ReservedNames::Win32::File.file_access_check(
path, Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_WRITE
)
end
@@ -136,7 +136,7 @@ class Chef
end
def should_update_dacl?
- return true unless ::File.exists?(file) || ::File.symlink?(file)
+ return true unless ::File.exist?(file) || ::File.symlink?(file)
dacl = target_dacl
existing_dacl = existing_descriptor.dacl
@@ -170,7 +170,7 @@ class Chef
end
def should_update_group?
- return true unless ::File.exists?(file) || ::File.symlink?(file)
+ return true unless ::File.exist?(file) || ::File.symlink?(file)
(group = target_group) && (group != existing_descriptor.group)
end
@@ -190,7 +190,7 @@ class Chef
end
def should_update_owner?
- return true unless ::File.exists?(file) || ::File.symlink?(file)
+ return true unless ::File.exist?(file) || ::File.symlink?(file)
(owner = target_owner) && (owner != existing_descriptor.owner)
end