mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
chore(review): use async
This commit is contained in:
parent
81755d804b
commit
bd363dac93
@ -1,4 +1,4 @@
|
||||
import fs from "fs";
|
||||
import fs from "fs/promises";
|
||||
import path from "path";
|
||||
import url from "url";
|
||||
import port from "./port.js";
|
||||
@ -83,7 +83,7 @@ ipcMain.on("export-as-pdf", async (e, opts: ExportAsPdfOpts) => {
|
||||
}
|
||||
|
||||
try {
|
||||
fs.writeFileSync(filePath, buffer);
|
||||
await fs.writeFile(filePath, buffer);
|
||||
} catch (e) {
|
||||
dialog.showErrorBox(t("pdf.unable-to-export-title"), t("pdf.unable-to-save-message"));
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user