MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / validate_no_nul

Function validate_no_nul

src/storage.rs:671–678  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

669}
670
671fn 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
680fn validate_normal_components(path: &Path, allow_absolute: bool) -> Result<()> {
681 if path.as_os_str().is_empty() || has_current_dir_segment(path) {

Callers 1

resolveMethod · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected