From ae080bbd2a17fd9800c7828bb7b2e1195c50673a Mon Sep 17 00:00:00 2001 From: Pixel Perfect Date: Sat, 1 Aug 2026 21:30:17 -0700 Subject: [PATCH] fix(tpager): keep blocked migration history internal Signed-off-by: Pixel Perfect --- src/ui-touch/UITask.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ui-touch/UITask.cpp b/src/ui-touch/UITask.cpp index 81fcb2ef..939767a7 100644 --- a/src/ui-touch/UITask.cpp +++ b/src/ui-touch/UITask.cpp @@ -43893,6 +43893,18 @@ static bool uiDataFsReady() { strncpy(s_ui_data_root, "/meshcomod", sizeof s_ui_data_root - 1); return true; } + // A failed/incomplete reconciliation deliberately leaves the primary + // profile on internal flash. An older completion marker may still exist on + // the card, so it cannot be allowed to select SD history and recreate a + // split identity/history profile while the durable busy latch is armed. + if (g_sd_migration_blocked) { + if (SPIFFS.begin(false)) { + s_ui_data_fs = &SPIFFS; + s_ui_data_root[0] = '\0'; + return true; + } + return false; + } // Prefer an existing card history. On upgrade, however, an empty card must // not hide a Pager history that already lives in SPIFFS; keep using that // established store instead of silently re-homing it without a migration.