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.
2016-05-01 17:34:43 -07:00
..
__init__.py package files 2014-09-26 11:05:47 -04:00
acl.py Remove duplicate documentation fields 2016-01-28 09:24:20 -08:00
assemble.py fixed exit json 2016-03-09 15:42:30 -05:00
copy.py Merge pull request #2647 from bertvv/issue_2498 2016-03-17 08:49:39 -07:00
fetch.py Replace ansible_hostname with inventory_hostname (#3559) 2016-04-27 11:31:04 -04:00
file.py Remove old test on SELinux (#3510) 2016-04-21 10:44:11 -04:00
find.py removed 'overquoting' of example 2016-02-12 13:24:07 -05:00
ini_file.py ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol 2016-04-13 15:50:44 +02:00
lineinfile.py Merge pull request #2896 from towolf/add_diff_to_lineinfile 2016-02-18 05:35:17 -08:00
replace.py added follow to specific modules that support it 2016-02-15 14:14:56 -05:00
stat.py Change one param to be of type path 2016-02-29 00:33:34 -08:00
synchronize.py added rsync protocol support (#1999) 2016-04-08 11:41:53 -04:00
template.py Improve doc accuracy of template module 2016-04-13 10:04:06 +08:00
unarchive.py unarchive: use Python's tarfile module for tar listing (#3575) 2016-05-01 17:34:43 -07:00
xattr.py Set name to type path so that tilde and env vars are expanded 2016-02-28 23:46:40 -08:00