From cfa5dd4ae48d085f01bc39cfa77d575e52f7ffe9 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 16:08:06 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20replace=20predictable=20temp=20d?= =?UTF-8?q?ir=20with=20fs.mkdtemp=20in=20zip-entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: sunnylqm <615282+sunnylqm@users.noreply.github.com> --- src/utils/zip-entries.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/zip-entries.ts b/src/utils/zip-entries.ts index 9ddf6bd..d45d49c 100644 --- a/src/utils/zip-entries.ts +++ b/src/utils/zip-entries.ts @@ -143,11 +143,9 @@ export async function enumZipEntries( !entry.fileName.endsWith('/') && entry.fileName.toLowerCase().endsWith('.hap') ) { - const tempDir = path.join( - os.tmpdir(), - `nested_zip_${Date.now()}`, + const tempDir = await fs.mkdtemp( + path.join(os.tmpdir(), 'nested_zip_'), ); - await fs.ensureDir(tempDir); const tempZipPath = path.join(tempDir, 'temp.zip'); await new Promise((res, rej) => {