Skip to content

Commit

Permalink
retries in for removing dir
Browse files Browse the repository at this point in the history
  • Loading branch information
MikesGlitch committed Mar 2, 2025
1 parent 98739b0 commit 4cdef53
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/desktop-electron/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,13 @@ ipcMain.handle(
}

try {
await remove(currentBudgetDirectory);
await promiseRetry(retry => {
logMessage(
'info',
`Cleaning up old directory: ${currentBudgetDirectory}`,
);
return remove(currentBudgetDirectory).catch(retry);
});
} catch (error) {
// Fail silently. The move worked, but the old directory wasn't cleaned up - most likely a permission issue.
// This call needs to succeed to allow the user to continue using the app with the files in the new location.
Expand Down

0 comments on commit 4cdef53

Please sign in to comment.