Commit ecf7d8c9 by James Cammarata

Fix relative path bug in copy action

Without rebreaking #12055

Fixes #ansible-modules-core/2098
parent 53794b69
......@@ -105,6 +105,8 @@ class ActionModule(ActionBase):
for file in files:
full_path = os.path.join(base_path, file)
rel_path = full_path[sz:]
if rel_path.startswith('/'):
rel_path = rel_path[1:]
source_files.append((full_path, rel_path))
# If it's recursive copy, destination is always a dir,
......
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