mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Some files were created with file rights of 0o000. It was not even possible to read them.
This commit is contained in:
parent
0a59f9dbae
commit
0e896fe9fe
1 changed files with 2 additions and 1 deletions
|
@ -412,7 +412,8 @@ module.exports.pluginHandler = function (parent) {
|
||||||
if (process.platform == 'win32') {
|
if (process.platform == 'win32') {
|
||||||
readStream.pipe(obj.fs.createWriteStream(filePath));
|
readStream.pipe(obj.fs.createWriteStream(filePath));
|
||||||
} else {
|
} else {
|
||||||
const fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
|
var fileMode = (entry.externalFileAttributes >> 16) & 0x0fff;
|
||||||
|
if( fileMode <= 0 ) fileMode = 0o644;
|
||||||
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode }));
|
readStream.pipe(obj.fs.createWriteStream(filePath, { mode: fileMode }));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue