Environment
Typescript, Webpack, Browser.
Reproduction
tar -cpf home.tar ~/
tar --numeric-owner -tvf home.tar
console.log(parseTar(home));
Describe the bug
According to https://www.gnu.org/software/tar/manual/html_node/Standard.html, uid and gid are octal numbers encoded in ASCII.
|
const uid = Number.parseInt(_readString(buffer, offset + 108, 8)); |
Shouldn't it be
const uid = _readNumber(buffer, offset + 108, 8);
? Same for gid ?
A tar file created using GNU tar shows 1001/1001 with tar --numeric-owner -tvf and 1751/1751 with nanotar (0o1751 === 1001).
Additional context
No response
Logs
Environment
Typescript, Webpack, Browser.
Reproduction
tar -cpf home.tar ~/ tar --numeric-owner -tvf home.tarDescribe the bug
According to https://www.gnu.org/software/tar/manual/html_node/Standard.html,
uidandgidare octal numbers encoded in ASCII.nanotar/src/parse.ts
Line 57 in 4fe65ab
Shouldn't it be
? Same for gid ?
A tar file created using GNU tar shows 1001/1001 with
tar --numeric-owner -tvfand 1751/1751 with nanotar (0o1751 === 1001).Additional context
No response
Logs