mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
cca2eebb9b
commit
b0a3174683
2 changed files with 5 additions and 3 deletions
|
|
@ -19,4 +19,6 @@ hashbrown = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
toml = { workspace = true }
|
toml = { workspace = true }
|
||||||
uzers = { workspace = true }
|
|
||||||
|
[target."cfg(unix)".dependencies]
|
||||||
|
uzers = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,9 @@ impl Vfs {
|
||||||
pub(crate) fn reshape(self) -> io::Result<Self> {
|
pub(crate) fn reshape(self) -> io::Result<Self> {
|
||||||
for name in self.providers.keys() {
|
for name in self.providers.keys() {
|
||||||
if name.is_empty() || name.len() > 20 {
|
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'-')) {
|
} 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")))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue