From 528d304e0d5c33e729e6f5204f824c6421545519 Mon Sep 17 00:00:00 2001 From: daniel-j Date: Wed, 6 Dec 2023 21:13:38 +0100 Subject: [PATCH] keep parens in filename --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2b7034d..11182b4 100644 --- a/index.js +++ b/index.js @@ -166,7 +166,7 @@ router.get('/download/:key', async ctx => { } expireKey(key) // const fallback = basename(info.file.path) - const sanename = info.file.name.replace(/[^\.\w\-"']/g, '_') + const sanename = info.file.name.replace(/[^\.\w\-"'\(\)]/g, '_') console.log('Sending file', [info.file.path, info.file.name, sanename]) await sendfile(ctx, info.file.path) if (info.agent.includes('Kindle')) {