Skip to content

Commit c7e6394

Browse files
committed
Try to resolve deleting autoupdate tmp dir
1 parent 235dc7f commit c7e6394

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

objdiff-gui/src/jobs/update.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn run_update(
3636
let tmp_file = File::create(&tmp_path)?;
3737
self_update::Download::from_url(&asset.download_url)
3838
.set_header(reqwest::header::ACCEPT, "application/octet-stream".parse()?)
39-
.download_to(&tmp_file)?;
39+
.download_to(tmp_file)?;
4040

4141
update_status(status, "Extracting release".to_string(), 2, 3, &cancel)?;
4242
let tmp_file = tmp_dir.path().join("replacement_tmp");
@@ -51,6 +51,7 @@ fn run_update(
5151
perms.set_mode(0o755);
5252
fs::set_permissions(&target_file, perms)?;
5353
}
54+
tmp_dir.close()?;
5455

5556
update_status(status, "Complete".to_string(), 3, 3, &cancel)?;
5657
Ok(Box::from(UpdateResult { exe_path: target_file }))

0 commit comments

Comments
 (0)