fix(portable): harden persistence and release paths (#15)

Preserve legacy source data when portable sanitization cannot replace it, reject malformed settings without panicking, and make portable pairing regeneration durable before UI state changes.\n\nMake the packaged smoke assertion tolerate slow WebView startup and clarify AppImage storage behavior.\n\nRefs #15
This commit is contained in:
NimBold
2026-07-13 00:09:09 +03:30
parent f441c687f0
commit dad5b7bc5e
4 changed files with 65 additions and 29 deletions
+3
View File
@@ -4350,6 +4350,7 @@ fn get_free_space(app_handle: tauri::AppHandle, path: String) -> Result<String,
#[tauri::command]
fn set_keychain_password(
database: tauri::State<'_, crate::db::DbState>,
state: tauri::State<'_, AppState>,
id: String,
password: String,
@@ -4357,6 +4358,8 @@ fn set_keychain_password(
if state.storage_layout.is_portable()
&& id == crate::db::PAIRING_TOKEN_KEYCHAIN_ID
{
let connection = database.lock()?;
crate::db::save_pairing_token_to_settings(&connection, &password, true)?;
return Ok(());
}
crate::db::set_keychain_password(&id, &password)