Open warpdesign opened 7 years ago
From the API documentation:
If you want to create a directory the entryName must end in / and a null buffer should be provided.
When typing this zip.addFile('myDir/', null), I'm getting this error:
zip.addFile('myDir/', null)
node_modules\adm-zip\adm-zip.js:280 if (entry.isDirectory && content.length) { ^ TypeError: Cannot read property 'length' of null
This here works for me:
const zip = new AdmZip(); zip.addFile('dirname/', new Buffer(''));
Almost 4 years later, this hasn't been fixed...
From the API documentation:
If you want to create a directory the entryName must end in / and a null buffer should be provided.
When typing this
zip.addFile('myDir/', null)
, I'm getting this error: