This commit is contained in:
Vanessa 2022-12-10 16:26:12 +08:00
parent bf3904c2ce
commit fb8300a8a3
2 changed files with 8 additions and 6 deletions

View file

@ -488,7 +488,10 @@ const getExportPath = (option: { type: string, id: string }, removeAssets?: bool
} else if (option.type === "word") {
url = "/api/export/exportDocx";
}
let savePath = result.filePaths[0].endsWith(response.data.rootTitle) ? result.filePaths[0] : path.join(result.filePaths[0], replaceLocalPath(response.data.rootTitle));
let savePath = result.filePaths[0];
if (option.type !== "word" && !savePath.endsWith(response.data.rootTitle)) {
savePath = path.join(savePath, replaceLocalPath(response.data.rootTitle));
}
savePath = savePath.trim();
fetchPost(url, {
id: option.id,