summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2010-06-03 09:56:22 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2010-06-03 09:56:22 (GMT)
commit2ee9c6fa506595fd296879823f0b445f0aec26ce (patch)
tree0a9a0fbbf5f071cc0783c9212655b28ad3d5ddc7 /Lib/tarfile.py
parent593e4ca7a5300752c1fe595c22caa859b7fcd5fb (diff)
downloadcpython-2ee9c6fa506595fd296879823f0b445f0aec26ce.zip
cpython-2ee9c6fa506595fd296879823f0b445f0aec26ce.tar.gz
cpython-2ee9c6fa506595fd296879823f0b445f0aec26ce.tar.bz2
Issue #8833: tarfile created hard link entries with a size
field != 0 by mistake. The associated testcase did not expose this bug because it was broken too.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 4b03c28..a54b3b8 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1884,7 +1884,7 @@ class TarFile(object):
tarinfo.mode = stmd
tarinfo.uid = statres.st_uid
tarinfo.gid = statres.st_gid
- if stat.S_ISREG(stmd):
+ if type == REGTYPE:
tarinfo.size = statres.st_size
else:
tarinfo.size = 0L