diff options
| author | Tuna <dvt.tnhn.krlbs@icloud.com> | 2022-09-20 06:29:34 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-20 06:29:34 +0300 |
| commit | e248523d2aaff6c74919baada18934a19e997509 (patch) | |
| tree | a2ddacc2977b0119ec4ba94324886898ef08d460 | |
| parent | 0bb4e25ec432beb3629280ea65d1d5475b4f3ee1 (diff) | |
| download | rust-e248523d2aaff6c74919baada18934a19e997509.tar.gz rust-e248523d2aaff6c74919baada18934a19e997509.zip | |
Update src/bootstrap/config.rs
Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
| -rw-r--r-- | src/bootstrap/config.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index b8e776485e6..8b657788a68 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -821,7 +821,14 @@ impl Config { .and_then(|output| if output.status.success() { Some(output) } else { None }); if let Some(output) = output { let git_root = String::from_utf8(output.stdout).unwrap(); - config.src = PathBuf::from(git_root.trim().to_owned()) + let git_root = PathBuf::from(git_root.trim()).canonicalize().unwrap(); + let s = git_root.to_str().unwrap(); + + // Bootstrap is quite bad at handling /? in front of paths + config.src = match s.strip_prefix("\\\\?\\") { + Some(p) => PathBuf::from(p), + None => PathBuf::from(git_root), + }; } else { // We're building from a tarball, not git sources. // We don't support pre-downloaded bootstrap in this case. |
