diff --git a/pluginHandler.js b/pluginHandler.js index 83138a4c..ceb911c9 100644 --- a/pluginHandler.js +++ b/pluginHandler.js @@ -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; -}; \ No newline at end of file +};