Fix issues relating to app directory changes (#5826)

* Fix canceling app directory change

* Improve directory moving error messages

* tombi
This commit is contained in:
aecsocket
2026-04-17 15:00:08 +01:00
committed by GitHub
parent 7c642f7078
commit 9483656881
7 changed files with 87 additions and 27 deletions

View File

@@ -1,4 +1,5 @@
use crate::api::Result;
use tauri::Runtime;
use theseus::prelude::*;
pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
@@ -28,10 +29,10 @@ pub async fn settings_set(settings: Settings) -> Result<()> {
}
#[tauri::command]
pub async fn cancel_directory_change() -> Result<()> {
let state = State::get().await?;
let identifier = &state.app_identifier;
pub async fn cancel_directory_change<R: Runtime>(
app: tauri::AppHandle<R>,
) -> Result<()> {
let identifier = &app.config().identifier;
settings::cancel_directory_change(identifier).await?;
Ok(())
}