mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 16:03:20 -05: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 } ));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -535,4 +536,4 @@ module.exports.pluginHandler = function (parent) {
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user