From 520d075e1325fdb505b15b03cb4a201f46f5c2c9 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 26 Apr 2018 13:12:17 +0200 Subject: [PATCH] Log as soon as an entry is called --- src/vs/base/node/zip.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/base/node/zip.ts b/src/vs/base/node/zip.ts index cd7ec2c2612..0c034bf2820 100644 --- a/src/vs/base/node/zip.ts +++ b/src/vs/base/node/zip.ts @@ -101,16 +101,16 @@ function extractZip(zipfile: ZipFile, targetPath: string, options: IOptions, log if (isCanceled || zipfile.entryCount === extractedEntriesCount) { c(null); } else { - e(new ExtractError('Incomplete', new Error(nls.localize('incompleteExtract', "Incomplete. Extracted {0} of {1} entries", extractedEntriesCount, zipfile.entryCount)))); + e(new ExtractError('Incomplete', new Error(nls.localize('incompleteExtract', "Incomplete. Found {0} of {1} entries", extractedEntriesCount, zipfile.entryCount)))); } }, e)); zipfile.on('entry', (entry: Entry) => { + logService.debug(targetPath, 'Found', entry.fileName); + if (isCanceled) { return; } - logService.debug(targetPath, 'Extracting', entry.fileName); - if (!options.sourcePathRegex.test(entry.fileName)) { extractedEntriesCount++; return; @@ -131,6 +131,7 @@ function extractZip(zipfile: ZipFile, targetPath: string, options: IOptions, log last = throttler.queue(() => stream.then(stream => extractEntry(stream, fileName, mode, targetPath, options).then(() => extractedEntriesCount++))); }); }, () => { + logService.debug(targetPath, 'Cancelled.'); isCanceled = true; last.cancel(); zipfile.close(); -- GitLab