Fix folders not opening (#162)

This commit is contained in:
quexeky
2025-10-17 15:27:32 +11:00
committed by GitHub
parent 83d2301056
commit a2d1a989e0
4 changed files with 77 additions and 135 deletions

View File

@ -5,6 +5,7 @@ use download_manager::DOWNLOAD_MANAGER;
use log::{debug, error};
use tauri::AppHandle;
use tauri_plugin_autostart::ManagerExt;
use tauri_plugin_opener::OpenerExt;
use crate::AppState;
@ -72,3 +73,10 @@ pub fn get_autostart_enabled(app: AppHandle) -> Result<bool, tauri_plugin_autost
Ok(db_state)
}
#[tauri::command]
pub fn open_fs(path: String, app_handle: AppHandle) -> Result<(), tauri_plugin_opener::Error> {
app_handle
.opener()
.open_path(path, None::<&str>)
}

View File

@ -229,6 +229,7 @@ pub fn run() {
fetch_state,
quit,
fetch_system_data,
open_fs,
// User utils
update_settings,
fetch_settings,