Skip to content

Conversation

@chrisnovakovic
Copy link

ar archives are only capable of storing regular files, so the file mode bits that Reader prepends to every file mode header field are redundant (and it forces users to strip them off manually whenever a file header passes through a Writer multiple times, otherwise they accumulate and overflow the header field). Just encode the mode we were given - which may or may not contain file mode bits of its own, at the caller's discretion - in octal and insert it into the header field.

ar archives are only capable of storing regular files, so the file mode
bits that `Reader` prepends to every file mode header field are
redundant (and it forces users to strip them off manually whenever a
file header passes through a `Writer` multiple times, otherwise they
accumulate and overflow the header field). Just encode the mode we were
given - which may or may not contain file mode bits of its own, at the
caller's discretion - in octal and insert it into the header field.
@chrisnovakovic chrisnovakovic merged commit d685917 into please-build:master Oct 8, 2025
2 checks passed
@chrisnovakovic chrisnovakovic deleted the writer-mode-no-100 branch October 8, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants