You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/files
Virgil Dupras 82aeaed45d unarchive: use Python's tarfile module for tar listing (#3575)
* unarchive: use Python's tarfile module for tar listing

fixes https://github.com/ansible/ansible/issues/11348

Depending on the current active locale, `tar`'s file listing can end up
spitting backslash-escaped characters. Unfortunately, when that happens,
we end up with double-escaped backslashes, giving us a wrong path,
making our action fail.

We could try un-double-escaping our paths, but that would be complicated
and, I think, error-prone. The easiest way forward seemed to simply use
the `tarfile` module.

Why use it only for listing? Because the `unarchive` option also
supports the `extra_opts` option, and that supporting this would require
us to mimick `tar`'s interface.

For listing files, however, I don't think that the loss of `extra_opts`
support causes problems (well, I hope so).

* unarchive: re-add xz decompression support

Following previous change to use Python's `tarfile` module for tar file
listing, we lost `xz` decompression support. This commits re-add it by
adding a special case in `TarXzArchive` that pre-decompresses the source
file.
10 years ago
..
__init__.py package files 11 years ago
acl.py Remove duplicate documentation fields 10 years ago
assemble.py fixed exit json 10 years ago
copy.py Merge pull request #2647 from bertvv/issue_2498 10 years ago
fetch.py Replace ansible_hostname with inventory_hostname (#3559) 10 years ago
file.py Remove old test on SELinux (#3510) 10 years ago
find.py removed 'overquoting' of example 10 years ago
ini_file.py ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol 10 years ago
lineinfile.py Merge pull request #2896 from towolf/add_diff_to_lineinfile 10 years ago
replace.py added follow to specific modules that support it 10 years ago
stat.py Change one param to be of type path 10 years ago
synchronize.py added rsync protocol support (#1999) 10 years ago
template.py Improve doc accuracy of template module 10 years ago
unarchive.py unarchive: use Python's tarfile module for tar listing (#3575) 10 years ago
xattr.py Set name to type path so that tilde and env vars are expanded 10 years ago