mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix file and copy modules on py3 and enable tests. (#17239)
- Fix octal formatting of file mode in module response on py3. - Convert file path to unicode in copy action. - Enable file and copy module tests for py3 now that they pass.
This commit is contained in:
@@ -113,7 +113,7 @@ class ActionModule(ActionBase):
|
||||
# Walk the directory and append the file tuples to source_files.
|
||||
for base_path, sub_folders, files in os.walk(to_bytes(source)):
|
||||
for file in files:
|
||||
full_path = os.path.join(base_path, file)
|
||||
full_path = to_unicode(os.path.join(base_path, file), errors='strict')
|
||||
rel_path = full_path[sz:]
|
||||
if rel_path.startswith('/'):
|
||||
rel_path = rel_path[1:]
|
||||
|
||||
Reference in New Issue
Block a user