Skip to main content

rewrite_start_path

Function rewrite_start_path 

Source
pub fn rewrite_start_path(file: &Path, cwd: &Path, original: &str) -> String
Expand description

Rewrite file_path to be relative to cwd so a spawned command resolves correctly when its working directory is narrowed to a submodule root.

When pane cwd resolution narrows to a submodule, a caller’s super-root relative path does not resolve inside that cwd. On any filesystem miss or non-descendant path, the original string is returned unchanged.