This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lars.gustaebel
Recipients
Date 2004-09-16.08:44:18
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
When a TarFile object reads a tar archive, it scans
through the headers, converts them into TarInfo objects
and adds them to the internal data structures:

self.members.append(tarinfo)
self.membernames.append(tarinfo.name)

When a GNU longname member is processed, it is added at
a point in time when its name attribute has not yet
been replaced with the longname, so longnames in
self.membernames are truncated and therefore unusable.

This problem could have been fixed with a quick/dirty
hack. But I decided to remove self.membernames
completely because it is redundant. getnames() which
was the public interface to it now generates a list
on-the-fly from the list of members, so it always
reflects the actual state.

I encountered another small bug on the way. The docs
for TarFile.getmember() state: "If a member occurs more
than once in the archive, its last occurence is assumed
to be the most up-to-date version."
It was never implemented like that, so I fixed it, too.
History
Date User Action Args
2007-08-23 15:39:52adminlinkissue1029061 messages
2007-08-23 15:39:52admincreate