diff --git a/yazi-vfs/Cargo.toml b/yazi-vfs/Cargo.toml index bff77ed4..ba14c226 100644 --- a/yazi-vfs/Cargo.toml +++ b/yazi-vfs/Cargo.toml @@ -19,4 +19,6 @@ hashbrown = { workspace = true } serde = { workspace = true } tokio = { workspace = true } toml = { workspace = true } -uzers = { workspace = true } + +[target."cfg(unix)".dependencies] +uzers = { workspace = true } diff --git a/yazi-vfs/src/config/vfs.rs b/yazi-vfs/src/config/vfs.rs index d56b15a9..70cb3283 100644 --- a/yazi-vfs/src/config/vfs.rs +++ b/yazi-vfs/src/config/vfs.rs @@ -50,9 +50,9 @@ impl Vfs { pub(crate) fn reshape(self) -> io::Result { for name in self.providers.keys() { if name.is_empty() || name.len() > 20 { - Err(io::Error::other("VFS name `{name}` must be between 1 and 20 characters"))?; + Err(io::Error::other(format!("VFS name `{name}` must be between 1 and 20 characters")))?; } else if !name.bytes().all(|b| matches!(b, b'0'..=b'9' | b'a'..=b'z' | b'-')) { - Err(io::Error::other("VFS name `{name}` must be in kebab-case"))?; + Err(io::Error::other(format!("VFS name `{name}` must be in kebab-case")))?; } }