fix(app): a portable copy in a OneDrive folder keeps its index outside it

BRIEF §6.2 forbids a SQLite index in a synchronised folder. AppEnvironment.Detect now resolves the data folder
through Core.Windows' AppPaths and OneDriveFolders: a portable copy whose .\data would lie under a OneDrive sync
root (a OneDrive folder, or a Desktop or Documents folder backed up into one) keeps its data in
%LOCALAPPDATA%\Titano and stays portable otherwise; AppEnvironment.SyncedFolder names the OneDrive folder so the
user can be told. The pure choice lives in Core/IO/DataLocation (tested on Linux); reading the OneDrive accounts
key no longer fails start-up when it cannot be read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-12 16:02:33 +00:00
1 parent 8eaaef5085
commit 815782a708
12 files changed
+279 -53

No files matched your search

@@ -4,7 +4,8 @@ namespace Titano.Uploader.Infrastructure;
/// <summary>
/// Where the uploader keeps its files: <c>%LOCALAPPDATA%\Titano</c> (shared with the client), or <c>.\data</c> next
/// to the executable when <c>portable.txt</c> exists — the same rule as the desktop client.
/// to the executable when <c>portable.txt</c> exists — the desktop client's rule, except that the client never keeps
/// its SQLite index in a folder OneDrive synchronises; the Uploader's JSON files, written atomically, stay there.
/// </summary>
public sealed class UploaderEnvironment
{