Setup.exe over an existing install deletes accounts.json and settings.json (data lives in the Velopack install root) #91

Closed
opened 2026-10-10 18:40:14 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-10-10 18:40:14 +00:00 (Migrated from github.com)

Running gclo-dev-Setup.exe (v1.0.2-beta.1) over an existing 1.0.0 install on the maintainer's machine deleted %LOCALAPPDATA%\gclo\accounts.json, accounts.json.bak, settings.json and logs\. Velopack's Setup uninstalls the existing install first and removes the whole install root, and gclo keeps its per-user data in that same root (GcloPaths.DefaultDataRoot = %LOCALAPPDATA%\gclo). In-app updates (Update.exe apply) keep the files, which is why 1.0.0 → 1.0.1 did not lose anything; any fresh Setup run (reinstall, channel switch, the "reinstall 1.0.0" advice in the 1.0.1 notes) does.

Tokens survive: they live in Credential Manager (gclo:account:<id>), but without accounts.json their account records (name, organization, target root) are gone and the entries are orphaned.

Fix (1.0.2)

  • Move the default data root out of the install root, e.g. %LOCALAPPDATA%\KofTwentyTwo\gclo (keep GCLO_DATA_DIR as the override; vault target scoping already keys on the root, so the default root must stay unscoped to keep the existing gclo:account:<id> entries working).
  • On first start, migrate accounts.json, accounts.json.bak, settings.json and logs\ from %LOCALAPPDATA%\gclo when they exist there and the new root is empty (the app knows its install root from Velopack).
  • Threat model / ADR note: user data must never live where the installer or uninstaller deletes.
  • Test: migration unit tests; a UI smoke that the data root is outside AppContext.BaseDirectory's install root.

Blocks #67 (v1.0.2). Part of #62.

Running `gclo-dev-Setup.exe` (v1.0.2-beta.1) over an existing 1.0.0 install on the maintainer's machine **deleted `%LOCALAPPDATA%\gclo\accounts.json`, `accounts.json.bak`, `settings.json` and `logs\`**. Velopack's Setup uninstalls the existing install first and removes the whole install root, and gclo keeps its per-user data in that same root (`GcloPaths.DefaultDataRoot` = `%LOCALAPPDATA%\gclo`). In-app updates (`Update.exe` apply) keep the files, which is why 1.0.0 → 1.0.1 did not lose anything; any fresh Setup run (reinstall, channel switch, the "reinstall 1.0.0" advice in the 1.0.1 notes) does. Tokens survive: they live in Credential Manager (`gclo:account:<id>`), but without `accounts.json` their account records (name, organization, target root) are gone and the entries are orphaned. ## Fix (1.0.2) - Move the default data root out of the install root, e.g. `%LOCALAPPDATA%\KofTwentyTwo\gclo` (keep `GCLO_DATA_DIR` as the override; vault target scoping already keys on the root, so the **default** root must stay unscoped to keep the existing `gclo:account:<id>` entries working). - On first start, migrate `accounts.json`, `accounts.json.bak`, `settings.json` and `logs\` from `%LOCALAPPDATA%\gclo` when they exist there and the new root is empty (the app knows its install root from Velopack). - Threat model / ADR note: user data must never live where the installer or uninstaller deletes. - Test: migration unit tests; a UI smoke that the data root is outside `AppContext.BaseDirectory`'s install root. Blocks #67 (v1.0.2). Part of #62.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/gclo#91