diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs index 85cd8abb995..885b3a78236 100644 --- a/src/bootstrap/install.rs +++ b/src/bootstrap/install.rs @@ -46,10 +46,10 @@ fn change_drive(s: &str) -> Option { } fn is_dir_writable_for_user(dir: &PathBuf) -> bool { - let tmp_file = dir.join(".tmp"); - match fs::File::create(&tmp_file) { + let tmp = dir.join(".tmp"); + match fs::create_dir_all(&tmp) { Ok(_) => { - fs::remove_file(tmp_file).unwrap(); + fs::remove_dir_all(tmp).unwrap(); true } Err(e) => {