]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix SF bug # 1330039, patch # 1331635 from Lars Gustaebel (tarfile maintainer)
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 20 Oct 2005 04:50:13 +0000 (04:50 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 20 Oct 2005 04:50:13 +0000 (04:50 +0000)
commitb0e32e2b71633211be6a62d1afaa250fb23cd3b4
tree8c15e8edb03fba3a429fff0c5be609e6439bf745
parent40563eddf17f072a74eba0bf7b77229f77bcc3d3
Fix SF bug # 1330039, patch # 1331635 from Lars Gustaebel (tarfile maintainer)

Problem: if two files are assigned the same inode
number by the filesystem, the second one will be added
as a hardlink to the first, which means that the
content will be lost.

The patched code checks if the file's st_nlink is
greater 1. So only for files that actually have several
links pointing to them hardlinks will be created, which
is what GNU tar does.

Will backport.
Lib/tarfile.py
Lib/test/test_tarfile.py