Skip to content
Permalink
Browse files

Use path.join("foo").join("bar") instead of path.join("foo/bar")

The latter does not work together with \\?\ prefixed paths on Windows.
  • Loading branch information
phil-opp committed Jun 13, 2019
1 parent 3ebb68e commit a1ff03311dd74447e8e845b4b96f2e137850027d
Showing with 8 additions and 4 deletions.
  1. +2 −0 CHANGELOG.md
  2. +1 −1 src/rustc.rs
  3. +4 −2 src/sysroot.rs
  4. +1 −1 src/xargo.rs
@@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

- Fix incorrect joining of paths that caused some problems on Windows (de3091d4857b28670c5b5ddd323e70944e3a8d75).

## [0.5.11] - 2019-05-31

- Fix an issue with new `XBUILD_SYSROOT_PATH` environment variable ([#34](https://github.com/rust-osdev/cargo-xbuild/pull/34))
@@ -68,7 +68,7 @@ impl Sysroot {
/// Returns the path to Rust source, `$SRC`, where `$SRC/libstd/Carg.toml`
/// exists
pub fn src(&self) -> Result<Src> {
let src = self.path().join("lib/rustlib/src");
let src = self.path().join("lib").join("rustlib").join("src");

if src.join("rust/src/libstd/Cargo.toml").is_file() {
return Ok(Src {
@@ -269,7 +269,8 @@ pub fn update(
match util::cp_r(
&sysroot
.path()
.join("lib/rustlib")
.join("lib")
.join("rustlib")
.join(&meta.host)
.join("lib"),
&dst,
@@ -290,7 +291,8 @@ pub fn update(
match util::cp_r(
&sysroot
.path()
.join("lib/rustlib")
.join("lib")
.join("rustlib")
.join(&meta.host)
.join("bin"),
&bin_dst,
@@ -54,7 +54,7 @@ impl Home {
}

fn path(&self, triple: &str) -> Filesystem {
self.path.join("lib/rustlib").join(triple)
self.path.join("lib").join("rustlib").join(triple)
}

pub fn lock_ro(&self, triple: &str) -> Result<FileLock> {

0 comments on commit a1ff033

Please sign in to comment.
You can’t perform that action at this time.