Commit 58a0bcbe by James Cammarata

Fix issue with symlink path detection

Fixes #7627
Fixes #7664
parent 10074d36
......@@ -186,8 +186,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':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment