Closed nlf closed 7 years ago
Curious, you har a tar that has a directory entry with size but no content in the tar? Sounds invalid, but I can merge this anyway. Just want to make sure I'm not missing anything.
as i mentioned in #68:
On systems where disk allocation is performed on a directory basis, the size field will contain the maximum number of bytes (which may be rounded to the nearest disk block allocation unit) which the directory may hold. A size field of zero indicates no such limiting. Systems which do not support limiting in this manner should ignore the size field.
it just so happens we came across a tarball that was created on a system that allows for this, and since tar-stream doesn't write directly to disk anyway it seemed the correct behavior was to disregard the size field for directories.
Makes sense. I'll release when I get back from lunch On Thu, 11 May 2017 at 16.02, Nathan LaFreniere notifications@github.com wrote:
as i mentioned in #68 https://github.com/mafintosh/tar-stream/issues/68:
On systems where disk allocation is performed on a directory basis, the size field will contain the maximum number of bytes (which may be rounded to the nearest disk block allocation unit) which the directory may hold. A size field of zero indicates no such limiting. Systems which do not support limiting in this manner should ignore the size field.
it just so happens we came across a tarball that was created on a system that allows for this, and since tar-stream doesn't write directly to disk anyway it seemed the correct behavior was to disregard the size field for directories.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/mafintosh/tar-stream/pull/69#issuecomment-300798770, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW_VQKGvA0Five2FHoMFJfCy2Ci3nTuks5r4xTcgaJpZM4NL9dv .
1.5.4, Thanks!
closes #68
simplest possible fix without losing information