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

only require absolute paths for hardlinks

This commit is contained in:
sspans 2013-11-04 10:37:36 +01:00
parent eab6737209
commit 684921c1c1

View file

@ -280,13 +280,14 @@ def main():
elif state in ['link','hard']:
if os.path.isabs(src):
abs_src = src
else:
module.fail_json(msg="absolute paths are required")
if state == 'hard':
if os.path.isabs(src):
abs_src = src
else:
module.fail_json(msg="absolute paths are required")
if not os.path.exists(abs_src) and not force:
module.fail_json(path=path, src=src, msg='src file does not exist')
if not os.path.exists(abs_src) and not force:
module.fail_json(path=path, src=src, msg='src file does not exist')
if prev_state == 'absent':
changed = True