Поправки багов

This commit is contained in:
Book Pauk
2019-11-03 17:03:58 +07:00
parent 337eca87f2
commit 71e08aacc3
2 changed files with 3 additions and 1 deletions

View File

@@ -112,7 +112,7 @@ class FileDecompressor {
async unZip(filename, outputDir) { async unZip(filename, outputDir) {
const zip = new ZipStreamer(); const zip = new ZipStreamer();
return await await zip.unpack(filename, outputDir); return await zip.unpack(filename, outputDir);
} }
unBz2(filename, outputDir) { unBz2(filename, outputDir) {

View File

@@ -57,6 +57,8 @@ class ZipStreamer {
entryCallback = (entryCallback ? entryCallback : () => {}); entryCallback = (entryCallback ? entryCallback : () => {});
const unzip = new unzipStream({file: zipFile}); const unzip = new unzipStream({file: zipFile});
unzip.on('error', reject);
let files = []; let files = [];
unzip.on('extract', (en) => { unzip.on('extract', (en) => {
const entry = {path: en.name, size: en.size, compressedSize: en.compressedSize}; const entry = {path: en.name, size: en.size, compressedSize: en.compressedSize};