Skip to content

armgit / ente

Public Imported from GitHub
0

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

Check

Manav Rathi555eda06196b
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index 0ff7664d16..9cba9178df 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -303,8 +303,10 @@ const setupTrayItem = (mainWindow: BrowserWindow) => {
*/
const deleteLegacyDiskCacheDirIfExists = async () => {
const removeIfExists = async (dirPath: string) => {
- log.info(`Removing legacy disk cache from ${dirPath}`);
- await fs.rm(dirPath, { recursive: true });
+ if (existsSync(dirPath)) {
+ log.info(`Removing legacy disk cache from ${dirPath}`);
+ await fs.rm(dirPath, { recursive: true });
+ }
};
// [Note: Getting the cache path]
//