FIXME: Use redefined version of the `internalModuleStat` function

(cherry picked from commit 68da904c6ccdefe94deb04bde510f60f331d35b5)
This commit is contained in:
Aleksei Kuzmin 2017-10-31 03:29:12 +03:00
Родитель c8d1dd49a1
Коммит 73d1703470
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -85,6 +85,13 @@ const {
const localGlobal = global;
function stat(filename) {
// FIXME(alexeykuzmin): Get a redefined version of the `internalModuleStat`
// function (see "lib/common/asar.js" in the electron/electron repo).
// For some reason it has to be done after the upgrade to the Node.js v8.7.0.
// `const internalModuleStat` in the very beginning of the file
// holds a reference to a native Node.js implementation of the function.
const internalModuleStat = process.binding('fs').internalModuleStat;
filename = path.toNamespacedPath(filename);
const cache = stat.cache;
if (cache !== null) {