Generated tar fails to be unpacked including a unicode directory with some specific pattern
See original GitHub issueThe result.tar generated by the following codes fails to be unpacked,
const tar = require('tar-stream');
const writeStream = require('fs').createWriteStream('result.tar');
const pack = tar.pack();
pack.pipe(writeStream);
// the specific pattern I found:
// here, a '0' represents an ASCII character and a '哈' represents a unicode character
const directory = './0000000哈哈000哈哈0000哈哈00哈00哈0哈哈哈哈哈0哈/0000哈哈哈/';
const name = directory + 'somefile.txt';
const entry = pack.entry({ name }, 'any text', (...args) => console.log(args));
pack.finalize();
showing this after executing tar -xf result.tar
on terminal
tar: Ignoring malformed pax extended attribute tar: Error exit delayed from previous errors.
or something like this when double-clicked on Mac OS
Error 1: Operation not allowed
I’m working on Mac OS and have tried the codes on node of both version 6.9.1 and 7.5.0, producing the same result.
tar-stream
works perfectly with almost all other unicode patterns so I think there might be a bug?
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Shell 'tar: not found in archive' error when using regular ...
I'm addressing your second comment: tar do not accept glob pattern as argument (i.e. it won't interpret it) afaik. AFAICS, that says that...
Read more >Unzip Task - Apache Ant
The untar task recognizes the long pathname entries used by GNU tar. Please note that different ZIP tools handle timestamps differently when it...
Read more >tar --exclude doesn't exclude. Why? - Unix Stack Exchange
tar file that contains everything under /data, including the files in the subdirectories I wanted to exclude. Any idea why? and how to...
Read more >tarfile — Read and write tar archive files ... - Python Docs
Source code: Lib/tarfile.py The tarfile module makes it possible to read and write tar archives, including those using gzip, bz2 and lzma compression....
Read more >star(1): unique standard tape archiver - Linux man page
Star includes a pattern matcher to control the list of files to be processed. ... it may be that you will not be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Mensu can you test with https://github.com/mafintosh/tar-stream/pull/77 ?
@nono #77 worked perfectly with all the patterns above! 😄 Thanks for your contribution!