mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
re-threadify program launching
This commit is contained in:
@@ -4,8 +4,10 @@ use crate::file_helpers;
|
|||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn run_program(path: String) {
|
pub fn run_program(path: String) {
|
||||||
// Open the program from the specified path.
|
// Open in new thread to prevent blocking.
|
||||||
|
thread::spawn(move || {
|
||||||
open::that(&path).unwrap();
|
open::that(&path).unwrap();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
|
|||||||
Reference in New Issue
Block a user