Skip to main content

normalize_working_dir

Function normalize_working_dir 

Source
pub(crate) fn normalize_working_dir(dir: &str) -> String
Expand description

Normalize a working directory for use as an index key.

Separators are unified and trailing ones dropped so the same directory written C:\x\y, C:/x/y and C:/x/y/ all collide on one key. Case is folded on Windows only: its filesystem is case-insensitive, so C:\Users and c:\users are genuinely the same directory — but on Linux they are two different directories, and folding case there would merge the history of two unrelated agents.