Skip to content

Commit

Permalink
Preservation of the executable rights of the files contained in a plu…
Browse files Browse the repository at this point in the history
…gin (#5865)

On file systems that support this, the executable rights of a plug-in's files are retained.
  • Loading branch information
wdlut committed Mar 3, 2024
1 parent 9e9cd82 commit e6a71d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pluginHandler.js
Expand Up @@ -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 } ));
});
}
});
Expand Down Expand Up @@ -535,4 +536,4 @@ module.exports.pluginHandler = function (parent) {
}
}
return obj;
};
};

0 comments on commit e6a71d7

Please sign in to comment.