summaryrefslogtreecommitdiff
path: root/lib/chef/file_access_control/windows.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-01-26 08:21:19 -0800
committerTim Smith <tsmith84@gmail.com>2021-02-02 11:50:43 -0800
commit5a2bab642653a715cd73be1f04062e37322b82a7 (patch)
tree0628a51dc69dfb2733bec04d612d065141192273 /lib/chef/file_access_control/windows.rb
parent96e1f6d3f52e0ce6e66087ede8b65bf342154a26 (diff)
downloadchef-file_exists.tar.gz
Replace deprecated File.exists? with File.exist? in more placesfile_exists
Just some boring cleanup Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/file_access_control/windows.rb')
-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