Skip to content

Commit

Permalink
Bugfix for plugin filemode Ylianst#5865 (Ylianst#5897)
Browse files Browse the repository at this point in the history
Some files were created with file rights of 0o000. It was not even possible to read them.
  • Loading branch information
wdlut committed Mar 19, 2024
1 parent 58d0dda commit 5c3f7e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pluginHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ module.exports.pluginHandler = function (parent) {
if (process.platform == 'win32') {
readStream.pipe(obj.fs.createWriteStream(filePath));
} 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 }));
}
});
Expand Down

0 comments on commit 5c3f7e5

Please sign in to comment.