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.
9 years ago
..
__init__.py package files 10 years ago
acl.py Remove duplicate documentation fields 9 years ago
assemble.py fixed exit json 9 years ago
copy.py Merge pull request #2647 from bertvv/issue_2498 9 years ago
fetch.py Replace ansible_hostname with inventory_hostname (#3559) 9 years ago
file.py Remove old test on SELinux (#3510) 9 years ago
find.py removed 'overquoting' of example 9 years ago
ini_file.py ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol 9 years ago
lineinfile.py Merge pull request #2896 from towolf/add_diff_to_lineinfile 9 years ago
replace.py added follow to specific modules that support it 9 years ago
stat.py Change one param to be of type path 9 years ago
synchronize.py added rsync protocol support (#1999) 9 years ago
template.py Improve doc accuracy of template module 9 years ago
unarchive.py unarchive: use Python's tarfile module for tar listing (#3575) 9 years ago
xattr.py Set name to type path so that tilde and env vars are expanded 9 years ago