From 12ce729ecbe25217ba2a6fe734515f0b2a538b40 Mon Sep 17 00:00:00 2001 From: Christian Emmer <10749361+emmercm@users.noreply.github.com> Date: Sat, 22 Jun 2024 09:47:07 -0700 Subject: [PATCH] Fix: ZJONSSON/node-unzipper#324 (#1171) --- src/types/files/archives/zip.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/types/files/archives/zip.ts b/src/types/files/archives/zip.ts index ab226e9b8..8ab0e23a2 100644 --- a/src/types/files/archives/zip.ts +++ b/src/types/files/archives/zip.ts @@ -45,7 +45,10 @@ export default class Zip extends Archive { const archive = await unzipper.Open.file(this.getFilePath()); return async.mapLimit( - archive.files.filter((entryFile) => entryFile.type === 'File'), + archive.files + .filter((entryFile) => entryFile.type === 'File') + // https://github.com/ZJONSSON/node-unzipper/issues/324 + .filter((entryFile) => typeof entryFile.offsetToLocalFileHeader === 'number'), Constants.ARCHIVE_ENTRY_SCANNER_THREADS_PER_ARCHIVE, async (entryFile, callback: AsyncResultCallback, Error>) => { let checksums: ChecksumProps = {};