Skip to content

Commit

Permalink
Only set fileMode if not win32, #5865
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Mar 3, 2024
1 parent e6a71d7 commit 436a3cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pluginHandler.js
Expand Up @@ -409,8 +409,12 @@ module.exports.pluginHandler = function (parent) {
zipfile.openReadStream(entry, function (err, readStream) {
if (err) throw err;
readStream.on('end', function () { zipfile.readEntry(); });
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode } ));
if (process.platform == 'win32') {
readStream.pipe(obj.fs.createWriteStream(filePath));
} else {
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode }));
}
});
}
});
Expand Down

0 comments on commit 436a3cb

Please sign in to comment.