Skip to content

Commit

Permalink
Merge pull request #489 from dabutvin/check-size
Browse files Browse the repository at this point in the history
make sure fileAfter size is greater than 0 before adding
  • Loading branch information
dabutvin committed Sep 29, 2019
2 parents d9e85f4 + ccffc97 commit cbd847d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CompressImagesFunction/CompressImages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private static CompressionResult[] OptimizeImages(Repository repo, string localP
}
FileInfo fileAfter = new FileInfo(image);
if (fileAfter.Length < before)
if (fileAfter.Length < before && fileAfter.Length > 0)
{
optimizedImages.Add(new CompressionResult
{
Expand Down

0 comments on commit cbd847d

Please sign in to comment.