Commit d1058222 by James Cammarata

Merge branch 'issue_4215_fetch_expanduser' into devel

parents 686d998b 2f39d37a
......@@ -56,6 +56,8 @@ class ActionModule(object):
results = dict(failed=True, msg="src and dest are required")
return ReturnData(conn=conn, result=results)
source = os.path.expanduser(source)
if flat:
if dest.endswith("/"):
# if the path ends with "/", we'll use the source filename as the
......@@ -68,7 +70,8 @@ class ActionModule(object):
else:
# files are saved in dest dir, with a subdir for each host, then the filename
dest = "%s/%s/%s" % (utils.path_dwim(self.runner.basedir, dest), conn.host, source)
dest = dest.replace("//","/")
dest = os.path.expanduser(dest.replace("//","/"))
# calculate md5 sum for the remote file
remote_md5 = self.runner._remote_md5(conn, tmp, source)
......
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