Added prev_state for directory

reviewable/pr18780/r1
drewlll2ll 11 years ago
parent 557ad6a411
commit 8fe3b05262

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

Loading…
Cancel
Save