when dragging a file on the window, check if it has the .torrent extension; smaller changes

This commit is contained in:
Mitchell Livingston
2007-11-13 00:56:58 +00:00
parent 6242508fe2
commit 7f9e4d9efe
5 changed files with 31 additions and 25 deletions

View File

@@ -85,7 +85,8 @@
tr_info info;
while ((file = [enumerator nextObject]))
{
if (tr_torrentParse(fLib, [file UTF8String], NULL, &info) == TR_OK)
if ([[file pathExtension] caseInsensitiveCompare: @"torrent"] == NSOrderedSame
&& tr_torrentParse(fLib, [file UTF8String], NULL, &info) == TR_OK)
{
count++;
size += info.totalSize;