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

Function normalize

src/sessions/shared.rs:184–189  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

182#[cfg(windows)]
183fn normalized_paths_equal(a: &Path, b: &Path) -> bool {
184 fn normalize(path: &Path) -> String {
185 let path = path.to_string_lossy().replace('/', "\\");
186 path.strip_prefix(r"\\?\")
187 .unwrap_or(&path)
188 .to_ascii_lowercase()
189 }
190
191 normalize(a) == normalize(b)
192}

Callers 1

normalized_paths_equalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected