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
{{ message }}
Repository navigation
Can't extract tar file: inappropriate type (Is a directory) #27
I extracted it with the "unxz" program and got "node-v8.9.3-linux-x64.tar". This file extracts just fine using the regular "tar" program. But when using this library (extract function) I get this error:
*** Exception: ./node-v8.9.3-linux-x64/lib/node_modules/npm/node_modules/readable-stream/node_modules/util-deprecate/: openBinaryFile: inappropriate type
Looking at the "entryContent", the "entryTarPath" is incorrect, and is supposed to be the file: node-v8.9.3-linux-x64/lib/node_modules/npm/node_modules/readable-stream/node_modules/util-deprecate/History.md
I suspect that this could be resolved by adding nicer support for GNU/old GNU/POSIX tar archives. According to this, GNU tar archives support unlimited file names, but according to a comment here, there doesn't seem to be any attempt to support this.
Activity
bitc commentedon Dec 18, 2017
Here is the "History.md" file, this is the Tar Entry just before the above failing one:
vmchale commentedon Feb 5, 2019
I suspect that this could be resolved by adding nicer support for GNU/old GNU/POSIX tar archives. According to this, GNU tar archives support unlimited file names, but according to a comment here, there doesn't seem to be any attempt to support this.
bitc commentedon Feb 8, 2019
I have some code that can extract PAX tar archives pretty well (note: these are different from GNU tar archives that I originally reported)
WARNING: This might have security issues (overwriting files outside the destination directory)
hasufell commentedon Mar 1, 2020
#50 seems related
Bodigrim commentedon Nov 19, 2023
It works better wrt long file names after #77, but still fails later on:
hasufell commentedon Dec 7, 2023
@Bodigrim I presume it works now?
Bodigrim commentedon Dec 7, 2023
@hasufell yes, it works.