From e0a1a55431607f7ffcfe65be67e0c3e8d3b78a35 Mon Sep 17 00:00:00 2001 From: Daniel Hobley Date: Fri, 24 Jun 2016 13:43:19 +0200 Subject: [PATCH] Fixed symlinks on windows where the slashes don't match - This commit fixes detecting whether a symlink is correctly setup or not, we now make sure that we are testing the normalised paths --- salt/states/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/states/file.py b/salt/states/file.py index b3c5f9d036..e425ff2a63 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -900,7 +900,7 @@ def symlink( ) if __salt__['file.is_link'](name): # The link exists, verify that it matches the target - if __salt__['file.readlink'](name) != target: + if os.path.normpath(__salt__['file.readlink'](name)) != os.path.normpath(target): # The target is wrong, delete the link os.remove(name) else: