Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_zip.entries.forEach(function(entry) {
if (entry.isDirectory) {
Utils.makeDir(pth.resolve(targetPath, entry.entryName.toString()));
return;
}
var content = entry.getData();
if (!content) {
throw Utils.Errors.CANT_EXTRACT_FILE + "2";
}
Utils.writeFileTo(pth.resolve(targetPath, entry.entryName.toString()), content, overwrite);
});
},