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

zip64: TypeError on finalize #12

Closed
ctalkington opened this issue Feb 9, 2015 · 4 comments
Closed

zip64: TypeError on finalize #12

ctalkington opened this issue Feb 9, 2015 · 4 comments

Comments

@ctalkington
Copy link
Member

TypeError: Argument must be a string
    at Buffer.write (buffer.js:353:25)
    at ZipArchiveOutputStream._writeCentralFileHeader (/app/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:265:14)
    at null.<anonymous> (/app/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:118:10)
    at Array.forEach (native)
    at ZipArchiveOutputStream._finish (/app/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:117:17)
    at ArchiveOutputStream.finish (/app/node_modules/archiver/node_modules/zip-stream/node_modules/compress-commons/lib/archivers/archive-output-stream.js:105:8)
    at ZipStream.finalize (/app/node_modules/archiver/node_modules/zip-stream/lib/zip-stream.js:109:8)
    at Zip.finalize (/app/node_modules/archiver/lib/plugins/zip.js:34:15)
    at Archiver._moduleFinalize (/app/node_modules/archiver/lib/core.js:124:18)
    at Archiver._finalize (/app/node_modules/archiver/lib/core.js:89:8)

as reported on
archiverjs/node-archiver#120

@ctalkington
Copy link
Member Author

cc @disbelief

@ctalkington
Copy link
Member Author

pretty sure this traces back to

https://github.com/ctalkington/node-compress-commons/blob/0.2.1/lib/archivers/zip/zip-archive-output-stream.js#L265-L269

where its trying to write buffers to a buffer but buffer write only works with strings

@ctalkington
Copy link
Member Author

@disbelief 0.2.2 has been released. this should fix that specific error. in regards to such sizes, zip64 needs testing but if you can provide feedback then we can get it ironed out. haven't had any such feedback yet.

@disbelief
Copy link

fantastic, @ctalkington

I've dropped it into my application now. We deal with large files quite frequently so I'll let you know how it goes.

Thanks for the quick help with this, it's much appreciated!

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