From c276dec487e883ca8369dc79921fa0dc708a1dc8 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 4 Jun 2014 23:31:59 -0500 Subject: [PATCH] Fix issue with symlink path detection Fixes #7627 Fixes #7664 --- files/file | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/file b/files/file index 0e50cb67e89..effbe6b5095 100644 --- a/files/file +++ b/files/file @@ -193,8 +193,9 @@ def main(): relpath = path else: relpath = os.path.dirname(path) + absrc = os.path.normpath('%s/%s' % (relpath, os.path.basename(src))) - if not os.path.exists(absrc) and not force: + if not os.path.exists(src) and not os.path.exists(absrc) and not force: module.fail_json(path=path, src=src, msg='src file does not exist, use "force=yes" if you really want to create the link: %s' % absrc) if state == 'hard':