This commit is contained in:
Manav Rathi 2024-05-06 19:28:05 +05:30
parent 333f364d38
commit 555eda0619
No known key found for this signature in database

View file

@ -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]
//