From e40d334c7a71bc585330f92d99f8f38a80ae4c01 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 11 Dec 2022 11:34:56 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=AF=BC=E5=87=BA=20word=20=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/editor/rename.ts | 2 +- app/src/protyle/export/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/editor/rename.ts b/app/src/editor/rename.ts index d2b95e149..70a6c0df6 100644 --- a/app/src/editor/rename.ts +++ b/app/src/editor/rename.ts @@ -36,7 +36,7 @@ export const replaceFileName = (name: string) => { }; export const replaceLocalPath = (name: string) => { - return name.replace(/\\\\|\/|:|\*|\?|\\|'|<|>|\|/g, ""); + return name.replace(/\\\\|\/|"|:|\*|\?|\\|'|<|>|\|/g, ""); }; export const rename = (options: { diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 5015f8aec..f1473befe 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -505,7 +505,7 @@ const getExportPath = (option: { type: string, id: string }, removeAssets?: bool hideMessage(msgId); return; } - afterExport(savePath, msgId); + afterExport(path.join(savePath, replaceLocalPath(response.data.rootTitle)) + ".docx", msgId); } else { onExport(exportResponse, savePath, option.type, removeAssets, msgId); }