1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Fixed unlink() required callback in NodeJS v10.

This commit is contained in:
Ylian Saint-Hilaire 2019-01-06 20:32:12 -08:00
parent a1883fc178
commit ed5b5cbd34
4 changed files with 4 additions and 10 deletions

View file

@ -580,12 +580,6 @@ function CreateMeshCentralServer(config, args) {
if (restoreFile) {
obj.debug(1, 'Server stopped, updating settings: ' + restoreFile);
console.log('Updating settings folder...');
/*
var unzip = require('unzip');
var rs = obj.fs.createReadStream(restoreFile);
rs.on('end', () => { setTimeout(function () { fs.unlinkSync(restoreFile); process.exit(123); }, 500); });
rs.pipe(unzip.Extract({ path: obj.datapath }));
*/
var yauzl = require("yauzl");
yauzl.open(restoreFile, { lazyEntries: true }, function (err, zipfile) {