mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix relative path bug in copy action
Without rebreaking #12055 Fixes #ansible-modules-core/2098
This commit is contained in:
parent
53794b692c
commit
ecf7d8c9ee
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,8 @@ class ActionModule(ActionBase):
|
||||||
for file in files:
|
for file in files:
|
||||||
full_path = os.path.join(base_path, file)
|
full_path = os.path.join(base_path, file)
|
||||||
rel_path = full_path[sz:]
|
rel_path = full_path[sz:]
|
||||||
|
if rel_path.startswith('/'):
|
||||||
|
rel_path = rel_path[1:]
|
||||||
source_files.append((full_path, rel_path))
|
source_files.append((full_path, rel_path))
|
||||||
|
|
||||||
# If it's recursive copy, destination is always a dir,
|
# If it's recursive copy, destination is always a dir,
|
||||||
|
|
Loading…
Reference in a new issue