From fb55517017e9b1d9b53fd5d73b6a2dcf6feb041d Mon Sep 17 00:00:00 2001 From: soc Date: Fri, 14 Jun 2019 23:17:27 +0200 Subject: [PATCH] Fix project dirs path ProjectDirs::from("miri", "miri", "miri") would get you `miri\miri` on Windows and `miri.miri.miri` on macOS. I'm assuming here that your intention was to have only a `miri` directory on every OS, so we are using `ProjectDirs::from_path instead, which skips the logic that computes the correct platform-specific paths altogether. --- .appveyor.yml | 2 +- src/bin/cargo-miri.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d13ce2b397..fe450922e0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -36,7 +36,7 @@ build_script: - cargo install --all-features --force --path . --locked --offline # Get ourselves a MIR-full libstd, and use it henceforth - cargo miri setup - - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\miri\miri\cache\HOST + - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\miri\cache\HOST test_script: # Test miri diff --git a/src/bin/cargo-miri.rs b/src/bin/cargo-miri.rs index 3b7af93241..c37c9ea48b 100644 --- a/src/bin/cargo-miri.rs +++ b/src/bin/cargo-miri.rs @@ -248,7 +248,7 @@ fn setup(ask_user: bool) { } // Next, we need our own libstd. We will do this work in whatever is a good cache dir for this platform. - let dirs = directories::ProjectDirs::from("miri", "miri", "miri").unwrap(); + let dirs = directories::ProjectDirs::from_path("miri").unwrap(); let dir = dirs.cache_dir(); if !dir.exists() { fs::create_dir_all(&dir).unwrap();