aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-14 09:35:08 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-14 09:35:08 +0000
commitb85c189500a47f3c5f7690250611b06e08616c9a (patch)
tree70f79c09404d326122932b03fbd2e4e695358762
parentebfa26658e9f65491e79f6853bb7c77030f5b0fe (diff)
parentf7a78b284617cf5a6343614cbe85b8bde1e1e68e (diff)
Merge #825
825: Remove call to canonicalize in BatchDatabase::load_cargo r=matklad a=vipentti Instead of using canonicalize, we now join the given path to `std::env::current_dir()`, which either replaces the path, if the given path is absolute, or joins the paths. This fixes #821. Co-authored-by: Ville Penttinen <[email protected]>
-rw-r--r--crates/ra_batch/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index 837fff4dc..d08fad908 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -95,7 +95,7 @@ impl BatchDatabase {
95 } 95 }
96 96
97 pub fn load_cargo(root: impl AsRef<Path>) -> Result<(BatchDatabase, Vec<SourceRootId>)> { 97 pub fn load_cargo(root: impl AsRef<Path>) -> Result<(BatchDatabase, Vec<SourceRootId>)> {
98 let root = root.as_ref().canonicalize()?; 98 let root = std::env::current_dir()?.join(root);
99 let ws = ProjectWorkspace::discover(root.as_ref())?; 99 let ws = ProjectWorkspace::discover(root.as_ref())?;
100 let mut roots = Vec::new(); 100 let mut roots = Vec::new();
101 roots.push(root.clone()); 101 roots.push(root.clone());