You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tarfile writes a member's old pax records after its name or other attributes are changed #161045
A TarInfo read from an archive keeps the member's pax records in pax_headers, and TarInfo.create_pax_header() gives an existing record priority over the attribute. If a program changes name (or linkname, uname, gname, uid, gid, mtime, size) on such a member, by assignment or with TarInfo.replace(), and adds it to a new archive in the default pax format, the new value goes into the ustar header but the old record is written in front of it and wins for every pax reader. Any member with a long or non-ASCII name has a path record, so no unusual input is needed.
This prints ['déjà-vu.txt', 'prefix/plain.txt']; expected ['prefix/d?j?-vu.txt', 'prefix/plain.txt']. member.replace(name=...) behaves the same, and a GNU.sparse.name record has the same effect as path. USTAR_FORMAT and GNU_FORMAT output is not affected.
Activity