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

Directories in wrong places, files missing #3

Closed
KyleAMathews opened this issue Apr 10, 2014 · 7 comments
Closed

Directories in wrong places, files missing #3

KyleAMathews opened this issue Apr 10, 2014 · 7 comments

Comments

@KyleAMathews
Copy link

I'm getting odd errors with this module. I create a tar-stream of the current directory and then write it out to a file. When I open the tar, about 1/8 of the directories are in the wrong place (they were 1 level deep, now they're in the top directory. And multiple files are missing. It seems the same directories/files are moved/missing each time.

@KyleAMathews
Copy link
Author

And it's not a files permission problem. All directories/files are owned by root and root is running the node process.

@mafintosh
Copy link
Owner

which os are you on? could you share the tar that is failing (and the layout of the folder you are trying to tar)?

@KyleAMathews
Copy link
Author

This is on Ubuntu. The folder is at https://github.com/KyleAMathews/blog. The relevant code is at https://github.com/KyleAMathews/blog/blob/master/deploy.coffee#L38

@KyleAMathews
Copy link
Author

I added tarStream.pipe(fs.createWriteStream('/tmp/blog.tar')) after that line to get the test file.

@mafintosh
Copy link
Owner

Yeah I'm able to reproduce, but only on ubuntu. I'll try to have a fix out shortly.

@mafintosh
Copy link
Owner

Fixed in 0.3.2.

This was caused by tar-stream identifying itself as ustar00 instead of ustar\x0000. GNUTar would then not expect the tar format to be ustar which is why it did weird stuff on long filenames.

Let me know if this also works for you.

@KyleAMathews
Copy link
Author

Yup! That did the trick. Thanks! Great timing too as I'm releasing something today and didn't want to do an ugly shell-out to tar :)

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

2 participants