Заменил пакет download на got, мелкий рефакторинг

This commit is contained in:
Book Pauk
2019-01-13 15:05:24 +07:00
parent 9adbffc9e5
commit 47b4bd9838
7 changed files with 118 additions and 356 deletions

View File

@@ -9,7 +9,7 @@ class FileDecompressor {
async decompressFile(filename, outputDir) {
const fileType = await this.detector.detectFile(filename);
if (!(fileType.ext == 'zip' || fileType.ext == 'bz2'))
if (!fileType || !(fileType.ext == 'zip' || fileType.ext == 'bz2'))
return filename;
const files = await decompress(filename, outputDir);