(path: &Path)
| 669 | } |
| 670 | |
| 671 | fn validate_no_nul(path: &Path) -> Result<()> { |
| 672 | if path.to_string_lossy().contains('\0') { |
| 673 | return Err(TraceDecayError::Config { |
| 674 | message: format!("path '{}' contains a NUL byte", path.display()), |
| 675 | }); |
| 676 | } |
| 677 | Ok(()) |
| 678 | } |
| 679 | |
| 680 | fn validate_normal_components(path: &Path, allow_absolute: bool) -> Result<()> { |
| 681 | if path.as_os_str().is_empty() || has_current_dir_segment(path) { |