forked from olcxjas-softworks/LarpixClient
update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
29
electron/node_modules/app-builder-lib/out/asar/asarFileChecker.js
generated
vendored
29
electron/node_modules/app-builder-lib/out/asar/asarFileChecker.js
generated
vendored
|
|
@ -1,38 +1,25 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.checkFileInArchive = void 0;
|
||||
const fs_1 = require("builder-util/out/fs");
|
||||
const asar_1 = require("./asar");
|
||||
/** @internal */
|
||||
exports.checkFileInArchive = checkFileInArchive;
|
||||
const dynamicImport_1 = require("../util/dynamicImport");
|
||||
async function checkFileInArchive(asarFile, relativeFile, messagePrefix) {
|
||||
const asar = await (0, dynamicImport_1.dynamicImport)("@electron/asar");
|
||||
function error(text) {
|
||||
return new Error(`${messagePrefix} "${relativeFile}" in the "${asarFile}" ${text}`);
|
||||
}
|
||||
let fs;
|
||||
try {
|
||||
fs = await asar_1.readAsar(asarFile);
|
||||
}
|
||||
catch (e) {
|
||||
throw error(`is corrupted: ${e}`);
|
||||
}
|
||||
let stat;
|
||||
try {
|
||||
stat = fs.getFile(relativeFile);
|
||||
stat = asar.statFile(asarFile, relativeFile, false);
|
||||
}
|
||||
catch (e) {
|
||||
const fileStat = await fs_1.statOrNull(asarFile);
|
||||
if (fileStat == null) {
|
||||
throw error(`does not exist. Seems like a wrong configuration.`);
|
||||
if (e.message.includes("Cannot read properties of undefined (reading 'link')")) {
|
||||
throw error("does not exist. Seems like a wrong configuration.");
|
||||
}
|
||||
// asar throws error on access to undefined object (info.link)
|
||||
stat = null;
|
||||
}
|
||||
if (stat == null) {
|
||||
throw error(`does not exist. Seems like a wrong configuration.`);
|
||||
throw error(`is corrupted: ${e}`);
|
||||
}
|
||||
if (stat.size === 0) {
|
||||
throw error(`is corrupted: size 0`);
|
||||
}
|
||||
return stat;
|
||||
}
|
||||
exports.checkFileInArchive = checkFileInArchive;
|
||||
//# sourceMappingURL=asarFileChecker.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue