Skip to content

Commit

Permalink
'#2234: Do not try to link items with zero length.
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed May 31, 2024
1 parent 746f5aa commit 4224193
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,11 @@ private static List<FileInTorrent> extractFileList(BencodedDict dict, Metadata m

// Try to link files to case items by hash
for (FileInTorrent file : files) {
linkTorrentToItem(searcher, metadata, file, "md5", file.md5, md5Len);
linkTorrentToItem(searcher, metadata, file, "sha-1", file.sha1, sha1Len);
linkTorrentToItem(searcher, metadata, file, "edonkey", file.ed2k, edonkeyLen);
if (file.length > 0) {
linkTorrentToItem(searcher, metadata, file, "md5", file.md5, md5Len);
linkTorrentToItem(searcher, metadata, file, "sha-1", file.sha1, sha1Len);
linkTorrentToItem(searcher, metadata, file, "edonkey", file.ed2k, edonkeyLen);
}
}

} else {
Expand Down

0 comments on commit 4224193

Please sign in to comment.