mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Fix bug in library/file
This commit is contained in:
parent
6ba91a715e
commit
66ba31aeb0
1 changed files with 3 additions and 2 deletions
|
@ -318,8 +318,9 @@ elif state == 'link':
|
||||||
if os.path.isabs(src):
|
if os.path.isabs(src):
|
||||||
abs_src = src
|
abs_src = src
|
||||||
else:
|
else:
|
||||||
abs_src = os.path.join(os.path.dirname(dest))
|
# FIXME: this does not seem correct? -- MPD
|
||||||
if not os.path.exists(abssrc):
|
abs_src = os.path.dirname(dest)
|
||||||
|
if not os.path.exists(abs_src):
|
||||||
fail_json(dest=dest, src=src, msg='src file does not exist')
|
fail_json(dest=dest, src=src, msg='src file does not exist')
|
||||||
|
|
||||||
if prev_state == 'absent':
|
if prev_state == 'absent':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue