Commit 5a918739 by Michael DeHaan

resolve merge conflict

parent 15901e85
...@@ -99,13 +99,10 @@ def main(): ...@@ -99,13 +99,10 @@ def main():
if os.path.exists(dest): if os.path.exists(dest):
if not thirsty: if not thirsty:
module.exit_json(msg="file already exists", src=src, dest=dest, changed=False) module.exit_json(msg="file already exists", src=src, dest=dest, changed=False)
if not os.access(dest, os.W_OK):
module.fail_json(msg="Destination %s not writable" % (dest))
if not os.access(dest, os.R_OK):
module.fail_json(msg="Destination %s not readable" % (dest))
if (os.path.isdir(dest)): if (os.path.isdir(dest)):
basename = os.path.basename(src) basename = os.path.basename(src)
dest = os.path.join(dest, basename) dest = os.path.join(dest, basename)
if os.access(dest, os.R_OK):
md5sum_dest = module.md5(dest) md5sum_dest = module.md5(dest)
else: else:
if not os.path.exists(os.path.dirname(dest)): if not os.path.exists(os.path.dirname(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