updater: rewrite openasar retaining
This commit is contained in:
parent
78b49c092c
commit
edb6a5b4fe
1 changed files with 6 additions and 7 deletions
|
@ -147,9 +147,8 @@ class Updater extends require('events').EventEmitter {
|
|||
// Retain OpenAsar
|
||||
const fs = require('original-fs');
|
||||
|
||||
const getAsar = (p) => join(p, '..', 'resources', 'app.asar');
|
||||
const cAsar = getAsar(cur);
|
||||
const nAsar = getAsar(next);
|
||||
const cAsar = join(require.main.filename, '..');
|
||||
const nAsar = join(next, '..', 'resources', 'app.asar');
|
||||
|
||||
try {
|
||||
fs.copyFileSync(nAsar, nAsar + '.backup'); // Copy new app.asar to backup file (<new>/app.asar -> <new>/app.asar.backup)
|
||||
|
|
Loading…
Reference in a new issue