A photo manager for VRChat.
1use std::process::Command; 2 3#[tauri::command] 4pub fn open_folder(url: &str) { 5 #[cfg(target_os = "windows")] 6 Command::new("explorer.exe").arg(format!("/select,{}", url)).spawn().unwrap(); 7 8 #[cfg(target_os = "linux")] 9 { 10 let url = url.replace("\\", "/"); 11 let mut path: Vec<&str> = url.split("/").collect(); 12 13 path.pop(); 14 Command::new("xdg-open").arg(path.join("/")).spawn().unwrap(); 15 } 16}