Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlinks are not preserved on unpack #22

Open
LINKIWI opened this issue Feb 28, 2017 · 1 comment
Open

Symlinks are not preserved on unpack #22

LINKIWI opened this issue Feb 28, 2017 · 1 comment

Comments

@LINKIWI
Copy link

LINKIWI commented Feb 28, 2017

tar-pack does not seem to preserve symlinks created during pack. For example, say node_modules contains symlinks in the directory .bin (which it does),

const tarPack = require('tar-pack');

const readStream = tarPack.pack('node_modules`);
readStream.pipe(tarPack.unpack('node_modules2', {keepFiles: true}));

Expected behavior: node_modules/.bin contains several symlinks, and node_modules2/.bin also contains the same relative symlinks.
Actual behavior: node_modules/.bin contains several symlinks, and node_modules2/.binis an empty directory.

Note that un-taring the .tar.gz using tar xvf <filename> causes the symlinks to be preserved correctly.

As far as I can tell there is no flag or option on unpack to configure this behavior, so I suspect this is a bug.

@LINKIWI
Copy link
Author

LINKIWI commented Feb 28, 2017

https://github.com/ForbesLindesay/tar-pack/blob/master/index.js#L161

This is a very misleading comment. Symbolic links are absolutely allowed in packages. Perhaps there is some context I'm missing here? The problem described above is no longer observed after forcing extractOpts.filter to always return true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant