From cabc20ca32fd6593b123aba68e3ffbd7a2a02018 Mon Sep 17 00:00:00 2001 From: Oj Date: Wed, 16 Feb 2022 15:00:04 +0000 Subject: [PATCH] [Poly > Yauzl] Add -q option to make extraction faster, remove logging as unneeded --- poly/yauzl.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/poly/yauzl.js b/poly/yauzl.js index f43392c..ee2b112 100644 --- a/poly/yauzl.js +++ b/poly/yauzl.js @@ -6,7 +6,6 @@ const { join, basename } = require('path'); exports.open = async (zipPath, _options, callback) => { const extractPath = join(global.moduleDataPath, basename(zipPath).split('.')[0].split('-')[0]); const listeners = []; - log('Yauzl', 'Zip path:', zipPath, 'Extract path:', extractPath); const errorOut = (err) => { listeners.error(err); @@ -24,8 +23,7 @@ exports.open = async (zipPath, _options, callback) => { mkdirSync(extractPath, { recursive: true }); - const proc = execFile('unzip', ['-o', zipPath.replaceAll('"', ''), '-d', extractPath]); - log('Yauzl', 'Spawned'); + const proc = execFile('unzip', ['-q', '-o', zipPath.replaceAll('"', ''), '-d', extractPath]); proc.stderr.on('data', errorOut); @@ -39,7 +37,6 @@ exports.open = async (zipPath, _options, callback) => { }); proc.on('close', async () => { - log('Yauzl', 'Closed'); listeners.end(); }); }; \ No newline at end of file