We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
x install
1 parent b0889cb commit 2c8759eCopy full SHA for 2c8759e
src/bootstrap/install.rs
@@ -46,10 +46,10 @@ fn sanitize_sh(path: &Path) -> String {
46
}
47
48
fn is_dir_writable_for_user(dir: &PathBuf) -> bool {
49
- let tmp_file = dir.join(".tmp");
50
- match fs::File::create(&tmp_file) {
+ let tmp = dir.join(".tmp");
+ match fs::create_dir_all(&tmp) {
51
Ok(_) => {
52
- fs::remove_file(tmp_file).unwrap();
+ fs::remove_dir_all(tmp).unwrap();
53
true
54
55
Err(e) => {
0 commit comments