cmds.secrets: Fix rewrite() of long member names #135
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20261003-cmds-secrets-fix-rewrite-of-long-member-names"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
cmds.secrets: Fix rewrite() of long member names
rewrite()renames the members of a tar blob, but the TarInfo objects carried over from the input still hold the paxpathsupplement that was recorded for the original name. Re-serialization (tf_out.addfile()) uses the pax supplement with higher precedence than what's in the base header's name filed, so for member names exceeding the 100 character ustar limit the rewrite silently has no effect and the original name is written back.Drop the stale
pathsupplement after renaming a member.tf_out.addfile()then builds a rewritten, up-to-date supplement from the name field if it needs one.