You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using electron-builder to create ZIP files, which uses app-builder internally. Specifically, it calls app-builder with the "blockmap" and "deflate" options and no output file. Sometimes when I run command-line unzip on the generated ZIP files, they give an error like:
Archive: MyApp-2.0.0-mac.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
I'm not a Go developer, but it looks to me like when blockmap is run with no output file, pkg/blockmap/blockmap.go is simply appending the compressed blockmap data to the end of the existing ZIP file. I found a really great comment at thejoshwolfe/yauzl#48 (comment) that discusses why appending data to the end of a ZIP file isn't valid.
I'd suggest using the end-of-central-directory comment to store the blockmap data, but it looks like the data can be longer than the max allowed comment length, so I'm not sure what would be the best approach.
I'm using electron-builder to create ZIP files, which uses app-builder internally. Specifically, it calls app-builder with the "blockmap" and "deflate" options and no output file. Sometimes when I run command-line
unzip
on the generated ZIP files, they give an error like:I'm not a Go developer, but it looks to me like when
blockmap
is run with no output file, pkg/blockmap/blockmap.go is simply appending the compressed blockmap data to the end of the existing ZIP file. I found a really great comment at thejoshwolfe/yauzl#48 (comment) that discusses why appending data to the end of a ZIP file isn't valid.I'd suggest using the end-of-central-directory comment to store the blockmap data, but it looks like the data can be longer than the max allowed comment length, so I'm not sure what would be the best approach.
Also xref electron-userland/electron-builder#3779, which helped me track this down.
The text was updated successfully, but these errors were encountered: