diff options
Diffstat (limited to 'lib/chef/provider/link.rb')
-rw-r--r-- | lib/chef/provider/link.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/link.rb b/lib/chef/provider/link.rb index 783d52d09a..b2ab2515d7 100644 --- a/lib/chef/provider/link.rb +++ b/lib/chef/provider/link.rb @@ -82,7 +82,7 @@ class Chef end def canonicalize(path) - Chef::Platform.windows? ? path.tr("/", '\\') : path + ChefHelpers.windows? ? path.tr("/", '\\') : path end def action_create @@ -101,7 +101,7 @@ class Chef # However if the new symlink will point to a file and the current symlink is pointing at a # directory we want to throw an exception and calling ::File.unlink on the directory symlink # will throw the correct ones. - if Chef::Platform.windows? && ::File.directory?(new_resource.to) && + if ChefHelpers.windows? && ::File.directory?(new_resource.to) && ::File.directory?(current_resource.target_file) converge_by("unlink existing windows symlink to dir at #{new_resource.target_file}") do ::Dir.unlink(new_resource.target_file) @@ -143,7 +143,7 @@ class Chef def action_delete if current_resource.to # Exists - if Chef::Platform.windows? && ::File.directory?(current_resource.target_file) + if ChefHelpers.windows? && ::File.directory?(current_resource.target_file) converge_by("delete link to dir at #{new_resource.target_file}") do ::Dir.delete(new_resource.target_file) logger.info("#{new_resource} deleted") |