INNER CODE UNIT · Rust
Some
hsr88/mouzi · src-tauri/src/lib.rs:57
if let Some(state) = app.try_state::<AppState>() {
let folder = state.pending_open_folder.lock().unwrap().take();
if let Some(path) = folder {
// Open the destination folder in Explorer robustly
#[cfg(target_os = "windows")]
{
let _ = std::process::Command::new("explorer.exe")
.arg(&path)
.spawn();
}
#[cfg(target_os = "macos")]
{
let _ = std::process::Command::new("open").arg(&path).spawn();
}
#[cfg(target_os = "linux")]
{
let _ = std::process::Command::new("xdg-open").arg(&path).spawn();
}