Commit 54a28eb4 by drewlll2ll

Added prev_state for directory

parent 929f8a5c
......@@ -307,6 +307,10 @@ def main():
if not force:
module.fail_json(dest=path, src=src, msg='Cannot link, file exists at destination')
changed = True
elif prev_state == 'directory':
if not force:
module.fail_json(dest=path, src=src, msg='Cannot link, directory exists at destination')
changed = True
else:
module.fail_json(dest=path, src=src, msg='unexpected position reached')
......
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