Issue 988444: tarfile.py and multiple extended headers (original) (raw)

At the moment, tarfile.py is only able to read one extended/special header (such as GNU longname etc.) at once from an archive. In some cases there may be more than one special header to process, e.g. an archive member that points to a long linkname itself having a long name, or a GNU sparse file member with a long name. In those cases tarfile.py will fail to read that particular member including all following ones. The attached patch fixes that problem plus some minor things that I came across while fixing it:

The patch is made against 2.4a1 sources.