[nodejs] Fixing Zip utility class to generate archives with unix-style paths inside (even on Windows)
@@ -45,7 +45,7 @@ class Zip {
*/
addFile(filePath, zipPath = path.basename(filePath)) {
let add = io.read(filePath)
- .then(buffer => this.z_.file(/** @type {string} */(zipPath), buffer));
+ .then(buffer => this.z_.file(/** @type {string} */(zipPath.replace(/\\/g, '/')), buffer));
this.pendingAdds_.add(add);
return add.then(
() => this.pendingAdds_.delete(add),
