[ python-Bugs-1719898 ] tarfile stops expanding with long filenames
SourceForge.net
noreply at sourceforge.net
Wed May 16 14:47:22 CEST 2007
Bugs item #1719898, was opened at 2007-05-16 11:32
Message generated for change (Settings changed) made by gustaebel
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1719898&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christian Zagrodnick (zagy)
>Assigned to: Lars Gustäbel (gustaebel)
Summary: tarfile stops expanding with long filenames
Initial Comment:
The tarfile module fixes an issue with "Some old tar programs represent a directory as a regular file with a trailing slash.":
if tarinfo.isreg() and tarinfo.name.endswith("/"):
tarinfo.type = DIRTYPE
*After* that the full filename is composed. The chars >100 are stored in "prefix":
if tarinfo.type != GNUTYPE_SPARSE:
tarinfo.name normpath(os.path.join(nts(tarinfo.prefix), tarinfo.name))
So guess what happens if you filename has a / at the 100th character. Right, its considered a directory. Since directories have no data, the next metadata block is read from your file data which fails in various ways.
Patch attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1719898&group_id=5470
More information about the Python-bugs-list
mailing list