Normalize a validated container-side mount target for semantic comparison.
(target: &str)
| 116 | |
| 117 | /// Normalize a validated container-side mount target for semantic comparison. |
| 118 | pub fn normalize_mount_target(target: &str) -> String { |
| 119 | if target == "/" { |
| 120 | return target.to_string(); |
| 121 | } |
| 122 | target.trim_end_matches('/').to_string() |
| 123 | } |
| 124 | |
| 125 | fn path_is_or_under(path: &Path, parent: &Path) -> bool { |
| 126 | path == parent || path.starts_with(parent) |
no outgoing calls
no test coverage detected