Skip to content

Commit

Permalink
Try to resolve deleting autoupdate tmp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Sep 10, 2024
1 parent 235dc7f commit c7e6394
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion objdiff-gui/src/jobs/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn run_update(
let tmp_file = File::create(&tmp_path)?;
self_update::Download::from_url(&asset.download_url)
.set_header(reqwest::header::ACCEPT, "application/octet-stream".parse()?)
.download_to(&tmp_file)?;
.download_to(tmp_file)?;

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

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

0 comments on commit c7e6394

Please sign in to comment.