Skip to content

Commit

Permalink
remove more dbg!
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Nov 17, 2023
1 parent b0ccdfa commit 61eb846
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions crates/updater/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,26 +680,20 @@ impl Update {
perms.set_mode(0o700);
std::fs::set_permissions(&tmp_dir, perms)?;

dbg!(&tmp_dir);
let (_, tmp_app_image) = tempfile::Builder::new()
.prefix("current_app")
.suffix(".AppImage")
.tempfile_in(tmp_dir)?
.keep()?;
dbg!(1);

// create a backup of our current app image
std::fs::rename(&self.extract_path, &tmp_app_image)?;
dbg!(3);

// if something went wrong during the extraction, we should restore previous app
if let Err(err) = std::fs::write(&self.extract_path, bytes) {
dbg!(4);
std::fs::rename(tmp_app_image, &self.extract_path)?;
dbg!(5);
return Err(err.into());
}
dbg!(6);

// early finish we have everything we need here
return Ok(());
Expand Down

0 comments on commit 61eb846

Please sign in to comment.