From 72e34fe980ec46be3053201ff5b8075997c92b60 Mon Sep 17 00:00:00 2001 From: Otto Sichert Date: Thu, 16 Jun 2022 00:13:31 +0200 Subject: [PATCH] Restore original behaviour in listing ZIP directories Signed-off-by: Otto Sichert --- .../backend-common/src/reading/tree/ZipArchiveResponse.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts b/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts index ffc2c8d9a7..418f32b155 100644 --- a/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts +++ b/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts @@ -90,6 +90,11 @@ export class ZipArchiveResponse implements ReadTreeResponse { const parseStream = this.stream .pipe(unzipper.Parse()) .on('entry', (entry: Entry) => { + if (entry.type === 'Directory') { + entry.resume(); + return; + } + if (this.shouldBeIncluded(entry)) { files.push({ path: this.getInnerPath(entry.path),