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); }