diff --git a/src/comp/util/filesearch.rs b/src/comp/util/filesearch.rs index 82859ce22f1e..d5919ea3e5a4 100644 --- a/src/comp/util/filesearch.rs +++ b/src/comp/util/filesearch.rs @@ -48,8 +48,6 @@ fn mk_filesearch(maybe_sysroot: option, result::ok(p) { [p] } result::err(p) { [] } } - + [fs::connect(fs::connect(self.sysroot, ".cargo"), - libdir())] } fn get_target_lib_path() -> fs::path { make_target_lib_path(self.sysroot, self.target_triple) @@ -113,7 +111,9 @@ fn get_sysroot(maybe_sysroot: option) -> fs::path { } fn get_cargo_sysroot() -> result::t { - result::ok(fs::connect(get_default_sysroot(), ".cargo")) + let path = [get_default_sysroot(), libdir(), "cargo"]; + check vec::is_not_empty(path); + result::ok(fs::connect_many(path)) } fn get_cargo_root() -> result::t {