question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generated tar fails to be unpacked including a unicode directory with some specific pattern

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nonocommented, Nov 13, 2017
0reactions
Mensucommented, Nov 13, 2017

@nono #77 worked perfectly with all the patterns above! 😄 Thanks for your contribution!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found