1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixing absolute path calculation for file module when linking

Fixes #7403
This commit is contained in:
James Cammarata 2014-05-21 12:48:27 -05:00
parent 981d56ba55
commit 062e82937f

View file

@ -191,7 +191,7 @@ def main():
absrc = src
if not os.path.isabs(absrc):
absrc = os.path.normpath('%s/%s' % (os.path.dirname(path), absrc))
absrc = os.path.abspath(src)
if 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)