asarUpdate: clean up old code

This commit is contained in:
Ducko 2022-09-28 13:33:26 +01:00
parent 73fcc84e25
commit 045f9db914
1 changed files with 0 additions and 5 deletions

View File

@ -1,6 +1,5 @@
const request = require('request');
const fs = require('original-fs'); // Use original-fs, not Electron's modified fs
// const { createHash } = require('crypto');
const { join } = require('path');
const asarPath = join(require.main.filename, '..');
@ -8,15 +7,11 @@ const downloadPath = join(asarPath, '..', 'app.asar.download');
const asarUrl = `https://github.com/GooseMod/OpenAsar/releases/download/${oaVersion.split('-')[0]}/app.asar`;
// const getAsarHash = () => createHash('sha512').update(fs.readFileSync(asarPath)).digest('hex');
module.exports = async () => { // (Try) update asar
log('AsarUpdate', 'Updating...');
if (!oaVersion.includes('-')) return;
// const originalHash = getAsarHash();
await new Promise((res) => {
const file = fs.createWriteStream(downloadPath);