diff options
| author | 2026-01-15 04:24:14 +0100 | |
|---|---|---|
| committer | 2026-01-15 04:24:14 +0100 | |
| commit | 1b3c84b0c78ea438c8f446054af196c620d30602 (patch) | |
| tree | d0ed6d88977e07b98fc3ccadaf3e22022684e31f /src-tauri/src/main.rs | |
| parent | 233c1ebf67a0a17ca1b64d41f69832c9ccf36211 (diff) | |
| download | DropOut-1b3c84b0c78ea438c8f446054af196c620d30602.tar.gz DropOut-1b3c84b0c78ea438c8f446054af196c620d30602.zip | |
fix: change Java installation path to use Tauri app handle for directory access
Diffstat (limited to 'src-tauri/src/main.rs')
| -rw-r--r-- | src-tauri/src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 2632924..a2b8c6c 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -848,8 +848,8 @@ async fn refresh_account( /// Detect Java installations on the system #[tauri::command] -async fn detect_java() -> Result<Vec<core::java::JavaInstallation>, String> { - Ok(core::java::detect_all_java_installations()) +async fn detect_java(app_handle: tauri::AppHandle) -> Result<Vec<core::java::JavaInstallation>, String> { + Ok(core::java::detect_all_java_installations(&app_handle)) } /// Get recommended Java for a specific Minecraft version @@ -876,6 +876,7 @@ async fn fetch_adoptium_java( /// Download and install Adoptium Java #[tauri::command] async fn download_adoptium_java( + app_handle: tauri::AppHandle, major_version: u32, image_type: String, custom_path: Option<String>, @@ -885,7 +886,7 @@ async fn download_adoptium_java( _ => core::java::ImageType::Jre, }; let path = custom_path.map(std::path::PathBuf::from); - core::java::download_and_install_java(major_version, img_type, path).await + core::java::download_and_install_java(&app_handle, major_version, img_type, path).await } /// Get available Adoptium Java versions |