From 990027d61be519ec17b1970491894f6b64b9906d Mon Sep 17 00:00:00 2001 From: Maya Date: Thu, 20 Nov 2025 07:42:24 +0300 Subject: [PATCH] fix: download all proper file extension if downloading all files as a .zip, if the result is a .zip (e.g. converting to docx) it would have the "target" file extension rather than the result. final file seems "broken", but has the wrong extension (.docx instead of .zip) --- src/lib/store/index.svelte.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/store/index.svelte.ts b/src/lib/store/index.svelte.ts index db0269d..7d14e56 100644 --- a/src/lib/store/index.svelte.ts +++ b/src/lib/store/index.svelte.ts @@ -350,13 +350,15 @@ class Files { for (let i = 0; i < files.files.length; i++) { const file = files.files[i]; const result = file.result; - let to = file.to; - if (!to.startsWith(".")) to = `.${to}`; if (!result) { error(["files"], "No result found"); continue; } + + let to = result.to; + if (!to.startsWith(".")) to = `.${to}`; + dlFiles.push({ name: file.file.name.replace(/\.[^/.]+$/, "") + to, lastModified: Date.now(),