Skip to main content

tree_relative_string

Function tree_relative_string 

Source
pub fn tree_relative_string(path: &Path) -> String
Expand description

Render a tree-relative path as a FORWARD-slash string — the canonical member/manifest-key form. Windows PathBuf::to_string_lossy emits \, which would poison the three cross-platform seams (zip member names, the codec manifest keys, the workspace manifest’s local_path — all git-shared or gateway-facing). Component-wise joining preserves a literal \ inside a POSIX filename, which a blanket replace would corrupt.