mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Only set fileMode if not win32, #5865
This commit is contained in:
parent
e6a71d77a1
commit
436a3cb9be
1 changed files with 6 additions and 2 deletions
|
|
@ -409,8 +409,12 @@ module.exports.pluginHandler = function (parent) {
|
||||||
zipfile.openReadStream(entry, function (err, readStream) {
|
zipfile.openReadStream(entry, function (err, readStream) {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
readStream.on('end', function () { zipfile.readEntry(); });
|
readStream.on('end', function () { zipfile.readEntry(); });
|
||||||
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
|
if (process.platform == 'win32') {
|
||||||
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode } ));
|
readStream.pipe(obj.fs.createWriteStream(filePath));
|
||||||
|
} else {
|
||||||
|
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
|
||||||
|
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode }));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue