diff options
| author | John Keiser <john@johnkeiser.com> | 2016-08-03 08:53:05 -0700 |
|---|---|---|
| committer | John Keiser <john@johnkeiser.com> | 2016-08-03 14:16:52 -0700 |
| commit | ea3ccf9d95ef751e1f2efe1a645648e75e7add24 (patch) | |
| tree | 2448697b8b4da94ee3169ea156fe0e8e2633a379 /lib/chef/file_access_control | |
| parent | f34d47a1ffc29291c0ea9f544254ccaf0c9db319 (diff) | |
| download | chef-ea3ccf9d95ef751e1f2efe1a645648e75e7add24.tar.gz | |
Fix Ruby 2.3 `symlink?` when symlink points to nonexistent file
Diffstat (limited to 'lib/chef/file_access_control')
| -rw-r--r-- | lib/chef/file_access_control/windows.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/file_access_control/windows.rb b/lib/chef/file_access_control/windows.rb index 6b7184bbd3..6f1ac5f581 100644 --- a/lib/chef/file_access_control/windows.rb +++ b/lib/chef/file_access_control/windows.rb @@ -128,7 +128,7 @@ class Chef end def should_update_dacl? - return true unless ::File.exists?(file) + return true unless ::File.exists?(file) || ::File.symlink?(file) dacl = target_dacl existing_dacl = existing_descriptor.dacl inherits = target_inherits @@ -161,7 +161,7 @@ class Chef end def should_update_group? - return true unless ::File.exists?(file) + return true unless ::File.exists?(file) || ::File.symlink?(file) (group = target_group) && (group != existing_descriptor.group) end @@ -180,7 +180,7 @@ class Chef end def should_update_owner? - return true unless ::File.exists?(file) + return true unless ::File.exists?(file) || ::File.symlink?(file) (owner = target_owner) && (owner != existing_descriptor.owner) end |
