From ff42f406a5c54eeb9d33c44704376e4e878e2c2f Mon Sep 17 00:00:00 2001 From: eoao Date: Sat, 25 Oct 2025 08:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E6=96=87=E4=BB=B6=E5=90=8D=E6=97=A0=E5=90=8E=E7=BC=80?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mail-worker/src/utils/file-utils.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mail-worker/src/utils/file-utils.js b/mail-worker/src/utils/file-utils.js index e92c623..413173c 100644 --- a/mail-worker/src/utils/file-utils.js +++ b/mail-worker/src/utils/file-utils.js @@ -1,7 +1,11 @@ const fileUtils = { getExtFileName(filename) { - const index = filename.lastIndexOf('.'); - return index !== -1 ? filename.slice(index) : ''; + try { + const index = filename.lastIndexOf('.'); + return index !== -1 ? filename.slice(index) : ''; + } catch (e) { + return '' + } }, async getBuffHash(buff) {