Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Remove the copied data when its location cannot be written

Fei2411acb190a13417
diff --git a/app/src/main.mjs b/app/src/main.mjs
index 2aad03d5..30a1d05e 100644
--- a/app/src/main.mjs
+++ b/app/src/main.mjs
@@ -303,7 +303,13 @@ async function moveData(workspace) {
mainWindow?.setProgressBar(2)
try {
await copyData(places.dataDir, to, signal)
- saveLocations({ dataDir: to, workspace })
+ try {
+ saveLocations({ dataDir: to, workspace })
+ } catch (error) {
+ // Unused, the copy would only keep the folder from being chosen again.
+ await rm(to, { recursive: true, force: true, maxRetries: 5 }).catch((failure) => { console.error(failure) })
+ throw error
+ }
} catch (error) {
if (signal.aborted) return
console.error(error)