mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 12:52:50 +03:00
Only set fileMode if not win32, #5865
This commit is contained in:
parent
e6a71d77a1
commit
436a3cb9be
@ -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 }));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user