diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 2d6f98ca..152e19d5 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -4,7 +4,6 @@ extern crate core; extern crate objc; use std::collections::HashMap; -use std::env::current_dir; use std::fs; use std::fs::{create_dir_all, read_to_string, File}; use std::path::PathBuf; diff --git a/src-tauri/yaak_plugin_runtime/src/plugin.rs b/src-tauri/yaak_plugin_runtime/src/plugin.rs index 67bd8695..2aa271ce 100644 --- a/src-tauri/yaak_plugin_runtime/src/plugin.rs +++ b/src-tauri/yaak_plugin_runtime/src/plugin.rs @@ -105,7 +105,11 @@ async fn read_plugins_dir(dir: &PathBuf) -> Result> { let mut dirs: Vec = vec![]; while let Ok(Some(entry)) = result.next_entry().await { if entry.path().is_dir() { - dirs.push(entry.path().to_string_lossy().to_string()) + // HACK: Remove UNC prefix for Windows paths to pass to sidecar + let safe_path = dunce::simplified(entry.path().as_path()) + .to_string_lossy() + .to_string(); + dirs.push(safe_path) } } Ok(dirs)