Skip to content

Commit ddc5041

Browse files
committed
error for trying to getattr non-replica at root
1 parent 0fca2cf commit ddc5041

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/fuse/util.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ pub fn parse_fuse_path(path: &Path) -> miette::Result<Option<(NamespaceId, PathB
4242
if let Some(_root) = components.next() {
4343
if let Some(replica_id) = components.next() {
4444
let replica_id_string = replica_id.as_os_str().to_str().unwrap_or_default();
45-
let namespace_id = NamespaceId::from(
46-
crate::fs::util::parse_array_hex_or_base32::<32>(replica_id_string)
47-
.unwrap_or_default(),
48-
);
45+
let namespace_id = NamespaceId::from(crate::fs::util::parse_array_hex_or_base32::<32>(
46+
replica_id_string,
47+
)?);
4948
let replica_path = PathBuf::from("/").join(components.as_path()).to_path_buf();
5049
return Ok(Some((namespace_id, replica_path)));
5150
} else {

0 commit comments

Comments
 (0)