Revert #1818 but avoid double-dwim, fixing relative fileglob

parent 891b1e37
...@@ -56,9 +56,9 @@ class ActionModule(object): ...@@ -56,9 +56,9 @@ class ActionModule(object):
if not found: if not found:
results=dict(failed=True, msg="could not find src in first_available_file list") results=dict(failed=True, msg="could not find src in first_available_file list")
return ReturnData(conn=conn, result=results) return ReturnData(conn=conn, result=results)
else:
source = utils.template(self.runner.basedir, source, inject) source = utils.template(self.runner.basedir, source, inject)
source = utils.path_dwim(self.runner.basedir, source) source = utils.path_dwim(self.runner.basedir, source)
local_md5 = utils.md5(source) local_md5 = utils.md5(source)
if local_md5 is None: if local_md5 is None:
......
...@@ -170,7 +170,6 @@ def prepare_writeable_dir(tree): ...@@ -170,7 +170,6 @@ def prepare_writeable_dir(tree):
def path_dwim(basedir, given): def path_dwim(basedir, given):
''' '''
make relative paths work like folks expect. make relative paths work like folks expect.
if a relative path is provided, convert it to an absolute path.
''' '''
if given.startswith("/"): if given.startswith("/"):
...@@ -178,7 +177,7 @@ def path_dwim(basedir, given): ...@@ -178,7 +177,7 @@ def path_dwim(basedir, given):
elif given.startswith("~/"): elif given.startswith("~/"):
return os.path.expanduser(given) return os.path.expanduser(given)
else: else:
return os.path.abspath(os.path.join(basedir, given)) return os.path.join(basedir, given)
def json_loads(data): def json_loads(data):
''' parse a JSON string and return a data structure ''' ''' parse a JSON string and return a data structure '''
......
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