Skip to content

Commit b916795

Browse files
committed
use proper platform cache dir
1 parent 4459d14 commit b916795

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/cargo-miri.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,9 @@ fn setup(ask_user: bool) {
145145
}
146146
}
147147

148-
// Next, we need our own libstd. We will do this work in ~/.miri.
149-
let dir = directories::UserDirs::new().unwrap().home_dir().join(".miri");
148+
// Next, we need our own libstd. We will do this work in whatever is a good cache dir for this platform.
149+
let dirs = directories::ProjectDirs::from("miri", "miri", "miri").unwrap();
150+
let dir = dirs.cache_dir();
150151
if !dir.exists() {
151152
fs::create_dir(&dir).unwrap();
152153
}

0 commit comments

Comments
 (0)