aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_batch/src
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-02-14 08:42:40 +0000
committerVille Penttinen <[email protected]>2019-02-14 08:57:06 +0000
commitf7a78b284617cf5a6343614cbe85b8bde1e1e68e (patch)
tree70f79c09404d326122932b03fbd2e4e695358762 /crates/ra_batch/src
parentebfa26658e9f65491e79f6853bb7c77030f5b0fe (diff)
Remove call to canonicalize in BatchDatabase::load_cargo
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.
Diffstat (limited to 'crates/ra_batch/src')
-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());