[Updater > Module] Minor source cleanup
This commit is contained in:
parent
9b1350fe59
commit
399727845b
1 changed files with 28 additions and 29 deletions
|
@ -298,7 +298,9 @@ const installModule = (name, ver, path) => {
|
||||||
finishInstall(name, ver, success);
|
finishInstall(name, ver, success);
|
||||||
};
|
};
|
||||||
|
|
||||||
const processZipfile = (e, zip) => {
|
|
||||||
|
try {
|
||||||
|
yauzl.open(path, {}, (e, zip) => {
|
||||||
if (e) return handleErr(e);
|
if (e) return handleErr(e);
|
||||||
|
|
||||||
const total = zip.entryCount;
|
const total = zip.entryCount;
|
||||||
|
@ -325,10 +327,7 @@ const installModule = (name, ver, path) => {
|
||||||
|
|
||||||
finishInstall(name, ver, success);
|
finishInstall(name, ver, success);
|
||||||
});
|
});
|
||||||
};
|
});
|
||||||
|
|
||||||
try {
|
|
||||||
yauzl.open(path, {}, processZipfile);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
onError(e);
|
onError(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue