(path: &str)
| 429 | } |
| 430 | |
| 431 | fn normalize_mount_path(path: &str) -> String { |
| 432 | if path.is_empty() { |
| 433 | return "/".to_string(); |
| 434 | } |
| 435 | let mut normalized = path.trim().to_string(); |
| 436 | if !normalized.starts_with('/') { |
| 437 | normalized.insert(0, '/'); |
| 438 | } |
| 439 | if normalized.len() > 1 && normalized.ends_with('/') { |
| 440 | normalized.pop(); |
| 441 | } |
| 442 | if normalized.is_empty() { |
| 443 | "/".to_string() |
| 444 | } else { |
| 445 | normalized |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | fn join_path(base: &str, segment: &str) -> String { |
| 450 | if base == "/" { |
no test coverage detected