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

Function normalized_paths_equal

src/sessions/shared.rs:183–192  ·  view source on GitHub ↗
(a: &Path, b: &Path)

Source from the content-addressed store, hash-verified

181
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}
193
194#[cfg(not(windows))]
195fn normalized_paths_equal(a: &Path, b: &Path) -> bool {

Callers 1

paths_equalFunction · 0.85

Calls 1

normalizeFunction · 0.70

Tested by

no test coverage detected