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

Function has_current_dir_segment

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

Source from the content-addressed store, hash-verified

701}
702
703fn has_current_dir_segment(path: &Path) -> bool {
704 let text = path.to_string_lossy();
705 text == "."
706 || text.starts_with("./")
707 || text.starts_with(".\\")
708 || text.ends_with("/.")
709 || text.ends_with("\\.")
710 || text.contains("/./")
711 || text.contains("\\.\\")
712}
713
714#[cfg(unix)]
715fn set_private_dir_permissions(path: &Path) -> std::io::Result<()> {

Callers 1

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected