mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-09-11 08:55:32 +03:00
Preservation of the executable rights of the files contained in a plugin (#5865)
On file systems that support this, the executable rights of a plug-in's files are retained.
This commit is contained in:
parent
9e9cd821bf
commit
e6a71d77a1
@ -409,7 +409,8 @@ module.exports.pluginHandler = function (parent) {
|
||||
zipfile.openReadStream(entry, function (err, readStream) {
|
||||
if (err) throw err;
|
||||
readStream.on('end', function () { zipfile.readEntry(); });
|
||||
readStream.pipe(obj.fs.createWriteStream(filePath));
|
||||
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
|
||||
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode } ));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user