diff options
Diffstat (limited to 'setuptools/archive_util.py')
-rwxr-xr-x | setuptools/archive_util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index b6411cc5..a1960be8 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -143,6 +143,8 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): tarobj.chown = lambda *args: None for member in tarobj: name = member.name + if isinstance(name, bytes): + name = name.decode(tarfile.ENCODING) # don't extract absolute paths or ones with .. in them if not name.startswith('/') and '..' not in name.split('/'): prelim_dst = os.path.join(extract_dir, *name.split('/')) |