Commit d85db4b9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

downloadunpacked: fix an issue in extracting hard links.

parent 270e1364
...@@ -174,6 +174,9 @@ def unpack_tarfile_patched(filename, extract_dir, progress_filter=setuptools.arc ...@@ -174,6 +174,9 @@ def unpack_tarfile_patched(filename, extract_dir, progress_filter=setuptools.arc
prelim_dst = os.path.join(extract_dir, *name.split('/')) prelim_dst = os.path.join(extract_dir, *name.split('/'))
if member is not None and (member.isfile() or member.isdir() or member.islnk() or member.issym()): if member is not None and (member.isfile() or member.isdir() or member.islnk() or member.issym()):
# Prepare the link target for makelink().
if member.islnk():
member._link_target = os.path.join(extract_dir, member.linkname)
final_dst = progress_filter(name, prelim_dst) final_dst = progress_filter(name, prelim_dst)
if final_dst: if final_dst:
if final_dst.endswith(os.sep): if final_dst.endswith(os.sep):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment