Fixes #4884 Do not prematurely exit from file module if src not defined

This commit is contained in:
James Tanner 2013-11-12 18:17:20 -05:00
commit 5a3032a950

View file

@ -186,11 +186,7 @@ def main():
prev_state = 'file' prev_state = 'file'
if prev_state is not None and state is None: if prev_state is not None and state is None:
if not params.get('src', None): # set state to current type of file
# idempotent exit if state is not specified
module.exit_json(path=path, changed=False)
else:
# src is defined, need to process other operations
state = prev_state state = prev_state
elif state is None: elif state is None:
# set default state to file # set default state to file