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.
This commit is contained in:
Ville Penttinen 2019-02-14 10:42:40 +02:00
parent ebfa26658e
commit f7a78b2846

View file

@ -95,7 +95,7 @@ impl BatchDatabase {
}
pub fn load_cargo(root: impl AsRef<Path>) -> Result<(BatchDatabase, Vec<SourceRootId>)> {
let root = root.as_ref().canonicalize()?;
let root = std::env::current_dir()?.join(root);
let ws = ProjectWorkspace::discover(root.as_ref())?;
let mut roots = Vec::new();
roots.push(root.clone());