Skip to content

Commit f7a78b2

Browse files
committed
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.
1 parent ebfa266 commit f7a78b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/ra_batch/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl BatchDatabase {
9595
}
9696

9797
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);
9999
let ws = ProjectWorkspace::discover(root.as_ref())?;
100100
let mut roots = Vec::new();
101101
roots.push(root.clone());

0 commit comments

Comments
 (0)