You've already forked AstralRinth
forked from didirus/AstralRinth
Misc bugs 4 (#381)
* bug fixes * fixed jres being undetected * cleanup * prettier * fixed folders not displaying windows exporting * fixes, more bugs * missed function * clippy, fmt * prettier
This commit is contained in:
@@ -12,6 +12,7 @@ pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
||||
profile_remove,
|
||||
profile_get,
|
||||
profile_get_optimal_jre_key,
|
||||
profile_get_full_path,
|
||||
profile_list,
|
||||
profile_check_installed,
|
||||
profile_install,
|
||||
@@ -55,6 +56,14 @@ pub async fn profile_get(
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
// Get a profile's full path
|
||||
// invoke('plugin:profile|profile_get_full_path',path)
|
||||
#[tauri::command]
|
||||
pub async fn profile_get_full_path(path: ProfilePathId) -> Result<PathBuf> {
|
||||
let res = profile::get_full_path(&path).await?;
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
// Get optimal java version from profile
|
||||
#[tauri::command]
|
||||
pub async fn profile_get_optimal_jre_key(
|
||||
|
||||
@@ -59,7 +59,7 @@ pub fn show_in_folder(path: String) -> Result<()> {
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
Command::new("explorer")
|
||||
.args(["/select,", &path]) // The comma after select is not a typo
|
||||
.args([&path]) // The comma after select is not a typo
|
||||
.spawn()?;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ pub fn show_in_folder(path: String) -> Result<()> {
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
Command::new("open").args(["-R", &path]).spawn()?;
|
||||
Command::new("open").args([&path]).spawn()?;
|
||||
}
|
||||
|
||||
Ok::<(), theseus::Error>(())
|
||||
|
||||
Reference in New Issue
Block a user