Commit 70777f04 by Michael DeHaan

Merge pull request #1047 from lotia/get_url_require_thirsty_if_dest_is_dir

Make get_url module always return dest. 
parents 4cffdbbc c0aac03b
......@@ -145,11 +145,10 @@ def main():
thirsty = module.boolean(module.params['thirsty'])
if not thirsty:
if os.path.exists(dest):
module.exit_json(msg="file already exists", changed=False)
if os.path.isdir(dest):
module.fail_json(msg="non-thirsty mode needs a filename for a destination, not a directory")
if os.path.exists(dest):
module.exit_json(msg="file already exists", dest=dest, url=url, changed=False)
# download to tmpsrc
tmpsrc, info = url_get(module, url, dest)
......
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