Rename to miniSCP; migrate legacy data dirs on boot

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jokin
2026-07-12 01:53:26 +02:00
co-authored by Claude Fable 5
parent 320080de6d
commit ba0b2434fb
7 changed files with 54 additions and 24 deletions
+5 -1
View File
@@ -7,6 +7,7 @@ import { SessionRegistry } from "./fs/registry";
import { applyApplicationMenu } from "./menu";
import { createAppRPC } from "./rpc-handlers";
import { ConnectionStore } from "./store/connections";
import { migrateLegacyDataDir } from "./store/paths";
import { SettingsStore } from "./store/settings";
import { AppTray } from "./tray";
import { TransferEngine } from "./transfers/engine";
@@ -31,6 +32,9 @@ async function getMainViewUrl(): Promise<string> {
}
}
// after a rebrand, adopt the previous name's data dir before stores read it
migrateLegacyDataDir();
const registry = new SessionRegistry();
const engine = new TransferEngine(registry);
const store = new ConnectionStore();
@@ -62,7 +66,7 @@ const win = new BrowserWindow({
? { titleBarStyle: "hiddenInset" as const, trafficLightOffset: { x: 12, y: 13 } }
: {}),
// lets the UI pick the fused layout before first paint
preload: `window.__BUNSCP_PLATFORM=${JSON.stringify(process.platform)};`,
preload: `window.__APP_PLATFORM=${JSON.stringify(process.platform)};`,
rpc,
});