Clean up RelPath API (#38912)
Consolidate constructors and accessors. Release Notes: - N/A --------- Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
co-authored by
Cole Miller
parent
301e976465
commit
495a7b0a84
@@ -1062,10 +1062,10 @@ impl DebugPanel {
|
||||
directory_in_worktree: dir,
|
||||
..
|
||||
} => {
|
||||
let relative_path = if dir.ends_with(RelPath::new(".vscode").unwrap()) {
|
||||
dir.join(RelPath::new("launch.json").unwrap())
|
||||
let relative_path = if dir.ends_with(RelPath::unix(".vscode").unwrap()) {
|
||||
dir.join(RelPath::unix("launch.json").unwrap())
|
||||
} else {
|
||||
dir.join(RelPath::new("debug.json").unwrap())
|
||||
dir.join(RelPath::unix("debug.json").unwrap())
|
||||
};
|
||||
ProjectPath {
|
||||
worktree_id: id,
|
||||
@@ -1136,7 +1136,7 @@ impl DebugPanel {
|
||||
}
|
||||
path.pop();
|
||||
|
||||
path.push(paths::local_debug_file_relative_path());
|
||||
path.push(paths::local_debug_file_relative_path().as_std_path());
|
||||
let path = path.as_path();
|
||||
|
||||
if !fs.is_file(path).await {
|
||||
|
||||
Reference in New Issue
Block a user