Decode only at the filesystem boundary; callers retain stored keys for graph lookup and status entries. Reject decoded traversal/absolute paths.
(path: &Path)
| 1350 | // Decode only at the filesystem boundary; callers retain stored keys for |
| 1351 | // graph lookup and status entries. Reject decoded traversal/absolute paths. |
| 1352 | fn tracked_worktree_path(path: &Path) -> PathBuf { |
| 1353 | path.to_str() |
| 1354 | .and_then(|text| super::project_tree::unescape_repo_path(text).ok()) |
| 1355 | .and_then(|bytes| super::RepoPath::new(bytes).ok()) |
| 1356 | .and_then(|path| path.to_native().ok()) |
| 1357 | .unwrap_or_else(|| path.to_path_buf()) |
| 1358 | } |
| 1359 | |
| 1360 | #[cfg(all(test, unix))] |
| 1361 | mod change_source_convergence_tests { |
no test coverage detected