unzip.js fails to unzip Foo.app inside of Foo.zip #11

springmeyer opened this Issue May 13, 2011 · 4 comments


None yet

2 participants

Mapbox member

Reason is that the directory of Foo.app is not created (on osx) because it is interpreted as a filename. So, need to find a more robust method of determining whether to create folders.

d:Build dane$ unzip.js TermKit.zip 

  return binding.open(path, stringToFlags(flags), mode);
Error: EBADF, Bad file descriptor 'TermKit.app/'
    at Object.openSync (fs.js:221:18)
    at /Users/dane/.nvm/v0.4.7/lib/node/.npm/zipfile/0.1.8/package/bin/unzip.js:29:21
d:Build dane$ coda /Users/dane/.nvm/v0.4.7/lib/node/.npm/zipfile/0.1.8/package/bin/unzip.js
Mapbox member

@clintonc - cool, thanks for taking a look. Note that this is not a problem core to the bindings, but rather the convenience command line script provided to go with the module. More robust usage could be plucked from https://github.com/mapbox/millstone/blob/master/lib/millstone.js#L112-163


Thanks - just realised after forking it and trying to find where folder vs file was managed :) Will apply that fix to our usage in calipso (https://github.com/cliftonc/calipso/blob/master/lib/cli/Download.js#L323) and then do the same to the CLI script here.


Mapbox member

closing, nothing actionable here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment