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 authored and rmarinho committed Dec 4, 2024
1 parent 0997df9 commit e14431a
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 e14431a

Please sign in to comment.