Skip to content

Commit

Permalink
Slight change to make sure we do not loop forever
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Oct 23, 2024
1 parent 90848fc commit 17a4998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SingleProject/Resizetizer/src/SkiaSharpTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void Save(string destination, SKBitmap tempBitmap)
case UnauthorizedAccessException:
case IOException:
var code = Marshal.GetHRForException(ex);
if ((code != ERROR_ACCESS_DENIED && code != ERROR_SHARING_VIOLATION) || attempt == attempts)
if ((code != ERROR_ACCESS_DENIED && code != ERROR_SHARING_VIOLATION) || attempt >= attempts)
{
throw;
}
Expand Down

0 comments on commit 17a4998

Please sign in to comment.