Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[desktop] Flush file writes

Manav Rathi9756c178bf48
diff --git a/desktop/src/main/services/fs.ts b/desktop/src/main/services/fs.ts
index a909ebf493..cdbded0beb 100644
--- a/desktop/src/main/services/fs.ts
+++ b/desktop/src/main/services/fs.ts
@@ -22,7 +22,7 @@ export const fsReadTextFile = async (filePath: string) =>
fs.readFile(filePath, "utf-8");
export const fsWriteFile = (path: string, contents: string) =>
- fs.writeFile(path, contents);
+ fs.writeFile(path, contents, { flush: true });
export const fsIsDir = async (dirPath: string) => {
if (!existsSync(dirPath)) return false;