lib/chef/scan_access_control.rb in chef-11.6.0.hotfix.1 vs lib/chef/scan_access_control.rb in chef-11.6.0.rc.0

- old
+ new

@@ -125,14 +125,9 @@ raise ArgumentError, "Invalid value #{new_resource.mode.inspect} for `mode` on resource #@new_resource" end end def stat - @stat ||= if @new_resource.instance_of?(Chef::Resource::Link) - ::File.lstat(@new_resource.path) - else - realpath = ::File.realpath(@new_resource.path) - ::File.stat(realpath) - end + @stat ||= @new_resource.instance_of?(Chef::Resource::Link) ? ::File.lstat(@new_resource.path) : ::File.stat(@new_resource.path) end end end