Merge pull request #5264 from drewlll2ll/file-fix

file module: Fixed missing prev_state == 'directory' in file
reviewable/pr18780/r1
jctanner 11 years ago
commit 87b58666f9

@ -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')

Loading…
Cancel
Save