feat(desktop): isolate private data by account
This commit is contained in:
parent
3e317745b5
commit
1d2a8a2f63
12 changed files with 143 additions and 60 deletions
|
|
@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
|
|||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
use tauri::{AppHandle, Manager};
|
||||
use tauri::AppHandle;
|
||||
use uuid::Uuid;
|
||||
|
||||
const KERNEL_SCHEMA: &str = "hololake.personal-channel-kernel/v1";
|
||||
|
|
@ -148,11 +148,7 @@ pub async fn transition_personal_channel_task(
|
|||
}
|
||||
|
||||
fn personal_channel_database(app: &AppHandle) -> Result<PathBuf, String> {
|
||||
let app_data = app
|
||||
.path()
|
||||
.app_data_dir()
|
||||
.map_err(|error| format!("HOLOLAKE_APP_DATA_UNAVAILABLE: {error}"))?;
|
||||
let root = app_data.join("personal-channel-v1");
|
||||
let root = crate::authenticated_storage::account_storage_root(app, "personal-channel-v1")?;
|
||||
create_private_directory(&root)?;
|
||||
Ok(root.join("personal-channel.sqlite3"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue