Skip to content

Commit

Permalink
fix race condition via delete file directly
Browse files Browse the repository at this point in the history
  • Loading branch information
damonyu666 committed Jul 30, 2023
1 parent 0a8a9ee commit 24e770f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Squirrel/UpdateManager.ApplyReleases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ await ReleasePackage.ExtractZipForInstall(
progressCallback);

// Delete the .not-finished file after extraction is completed
if (File.Exists(notFinishedFilePath)) {
this.ErrorIfThrows(() => {
File.Delete(notFinishedFilePath);
}
}, "Couldn't delete file: " + notFinishedFilePath);

return target.FullName;
});
Expand Down

0 comments on commit 24e770f

Please sign in to comment.