Skip to content

Commit

Permalink
fix cross device error
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Nov 17, 2023
1 parent 56f1cff commit 9580f41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/updater/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ impl Update {
.keep()?;

// create a backup of our current app image
std::fs::rename(&self.extract_path, &tmp_app_image)?;
if let Err(_) = std::fs::rename(&self.extract_path, &tmp_app_image) {
continue;
}

// if something went wrong during the extraction, we should restore previous app
if let Err(err) = std::fs::write(&self.extract_path, bytes) {
Expand Down

0 comments on commit 9580f41

Please sign in to comment.