Skip to content

Commit f3b1b87

Browse files
onur-ozkancuviper
authored andcommitted
ensure the parent path's existence on x install
Signed-off-by: onur-ozkan <[email protected]> (cherry picked from commit 2c8759e)
1 parent 489647f commit f3b1b87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bootstrap/install.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ fn sanitize_sh(path: &Path) -> String {
4646
}
4747

4848
fn is_dir_writable_for_user(dir: &PathBuf) -> bool {
49-
let tmp_file = dir.join(".tmp");
50-
match fs::File::create(&tmp_file) {
49+
let tmp = dir.join(".tmp");
50+
match fs::create_dir_all(&tmp) {
5151
Ok(_) => {
52-
fs::remove_file(tmp_file).unwrap();
52+
fs::remove_dir_all(tmp).unwrap();
5353
true
5454
}
5555
Err(e) => {

0 commit comments

Comments
 (0)