From b0a3174683d38c9417da0a0a3ec30350fa2513d8 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sun, 21 Sep 2025 10:54:49 +0800 Subject: [PATCH] .. --- yazi-vfs/Cargo.toml | 4 +++- yazi-vfs/src/config/vfs.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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")))?; } }