mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-12-05 23:32:40 -05:00
Only set fileMode if not win32, #5865
This commit is contained in:
@@ -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(); });
|
||||||
|
if (process.platform == 'win32') {
|
||||||
|
readStream.pipe(obj.fs.createWriteStream(filePath));
|
||||||
|
} else {
|
||||||
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
|
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
|
||||||
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode } ));
|
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode }));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user