Skip to content

Commit

Permalink
Fix the wrong union of image hashes in multiple folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kabuto_W committed Oct 9, 2021
1 parent eededfd commit 7654753
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions SimilarImages/SimilarImages/ImageHash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,8 @@ public static List<Tuple<string, string, double>> GetSimilarity(
var pairs = GetImageHashes(folderPath, hashEnum);
if (pairs != null)
{
if (imageHashPairs == null)
{
imageHashPairs = pairs;
}
else
{
imageHashPairs.Union(pairs);
}
imageHashPairs = imageHashPairs == null ? pairs :
imageHashPairs.Union(pairs).ToArray();
}
}

Expand Down

0 comments on commit 7654753

Please sign in to comment.