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

Tar directory depth #54

Closed
ewen opened this issue Jul 3, 2013 · 5 comments
Closed

Tar directory depth #54

ewen opened this issue Jul 3, 2013 · 5 comments

Comments

@ewen
Copy link

ewen commented Jul 3, 2013

Hi,

I'm trying to create a tarball of a src tree using this grunt plugin.

My config looks something like:
compress: {
main: {
options: {
archive: 'archive.tar',
mode: 'tar'
},
files: [
{expand: true, cwd: 'build/tar/', src: ['**'], dest: '/project/'}
]
}
}

And the tar is successfully created, but when I list the files with tar -tf archive.tar I get the following errors that look like:

:Archive contains 0' where numeric mode_t value expected tar: Archive contains0' where numeric mode_t value expected
tar: Exiting with failure status due to previous errors

After some experimentation it seems that it is related to the max depth of the tar contents, if they are more than 12 levels deep I get the errors, less and I don't.

The tar file does seem to be extractable despite the errors, although I haven't exhaustively checked all the files are present.

Any ideas on the cause would be much appreciated. Perhaps this is better asked in the node-archiver project?

Thanks!

@ewen
Copy link
Author

ewen commented Jul 3, 2013

To follow up on this after some more experimentation, it's not (directly) related to the dir depth but instead to the full file path length exceeded 100 chars. The wikipedia page talks about UStar format to address the file name limit (http://en.wikipedia.org/wiki/Tar_(computing)#Format_details). Which I guess isn't supported in archiver?

@ctalkington
Copy link
Member

@ewen i will adding prefix support to tar in the next version or possibly a patch release. lots of work on matching header specs lately to support parsing archives into archiver.

@ewen
Copy link
Author

ewen commented Jul 3, 2013

Cool, thanks a lot Chris.

@ewen ewen closed this as completed Jul 3, 2013
@ctalkington
Copy link
Member

@ewen archiver v0.4.6 has been pushed to npm. this should use prefix or throw an error telling it can't (if longer than 255). tar limit totally sucks :(

@ewen
Copy link
Author

ewen commented Jul 7, 2013

Tested and working! Thanks.

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