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
There's a trailing space in attrs.mode: mode: '000666 '. This isn't the fault of createTar, but the tar file I'm reading is slightly malformed and seems to return this.
Technically, this wouldn't be a problem if we were returning octal literals instead. Then anything from 0644 to 0000644 or more would be valid. For now I'm calling trim on the string when calling fs.writeFile(..., mode: file.attrs?.mode?.trim()), but this feels very very very wrong to do so in practice.
Maybe an API change to return numbers instead of a string might feel more intuitive to the end user who is likely to be using fs anyways?
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Node.js 18
nanotar: 0.1.1
Reproduction
Example attributes:
Describe the bug
There's a trailing space in
attrs.mode
: mode: '000666 '. This isn't the fault ofcreateTar
, but the tar file I'm reading is slightly malformed and seems to return this.Technically, this wouldn't be a problem if we were returning octal literals instead. Then anything from 0644 to 0000644 or more would be valid. For now I'm calling trim on the string when calling
fs.writeFile(..., mode: file.attrs?.mode?.trim())
, but this feels very very very wrong to do so in practice.Maybe an API change to return numbers instead of a string might feel more intuitive to the end user who is likely to be using
fs
anyways?Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: