Bugs item #1719898, was opened at 2007-05-16 09:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Nobody/Anonymous (nobody)
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
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to