Skip to content

armgit / ente

Public Imported from GitHub
0

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

Shorten

Manav Rathi025ef4e1d9cd
diff --git a/desktop/src/preload.ts b/desktop/src/preload.ts
index 5db4089cc8..32a7a21a13 100644
--- a/desktop/src/preload.ts
+++ b/desktop/src/preload.ts
@@ -141,26 +141,18 @@ const writeNodeStream = async (
// - Export
-export const exists = (path: string) => {
- return fs.existsSync(path);
-};
+const exists = (path: string) => fs.existsSync(path);
-export const checkExistsAndCreateDir = async (dirPath: string) => {
+const checkExistsAndCreateDir = async (dirPath: string) => {
if (!fs.existsSync(dirPath)) {
await fs.mkdir(dirPath);
}
};
-export const saveStreamToDisk = async (
- filePath: string,
- fileStream: ReadableStream<Uint8Array>,
-) => {
- await writeStream(filePath, fileStream);
-};
+const saveStreamToDisk = writeStream;
-export const saveFileToDisk = async (path: string, fileData: string) => {
- await fs.writeFile(path, fileData);
-};
+const saveFileToDisk = (path: string, contents: string) =>
+ fs.writeFile(path, contents);
// -