mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
potentially (hopefully) fix bug where some users couldn't add torrents
This commit is contained in:
@@ -2456,7 +2456,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||
|
||||
NSString * fullFile = [path stringByAppendingPathComponent: file];
|
||||
|
||||
if (![[[NSWorkspace sharedWorkspace] typeOfFile: fullFile error: NULL] isEqualToString: @"org.bittorrent.torrent"])
|
||||
if (![[[NSWorkspace sharedWorkspace] typeOfFile: fullFile error: NULL] isEqualToString: @"org.bittorrent.torrent"]
|
||||
|| [[fullFile pathExtension] caseInsensitiveCompare: @"torrent"] == NSOrderedSame)
|
||||
continue;
|
||||
|
||||
tr_ctor * ctor = tr_ctorNew(fLib);
|
||||
@@ -2698,7 +2699,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||
NSArray * files = [pasteboard propertyListForType: NSFilenamesPboardType];
|
||||
for (NSString * file in files)
|
||||
{
|
||||
if ([[[NSWorkspace sharedWorkspace] typeOfFile: file error: NULL] isEqualToString: @"org.bittorrent.torrent"])
|
||||
if ([[[NSWorkspace sharedWorkspace] typeOfFile: file error: NULL] isEqualToString: @"org.bittorrent.torrent"]
|
||||
|| [[file pathExtension] caseInsensitiveCompare: @"torrent"] == NSOrderedSame)
|
||||
{
|
||||
torrent = YES;
|
||||
tr_ctor * ctor = tr_ctorNew(fLib);
|
||||
@@ -2759,7 +2761,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||
NSMutableArray * filesToOpen = [NSMutableArray arrayWithCapacity: [files count]];
|
||||
for (NSString * file in files)
|
||||
{
|
||||
if ([[[NSWorkspace sharedWorkspace] typeOfFile: file error: NULL] isEqualToString: @"org.bittorrent.torrent"])
|
||||
if ([[[NSWorkspace sharedWorkspace] typeOfFile: file error: NULL] isEqualToString: @"org.bittorrent.torrent"]
|
||||
|| [[file pathExtension] caseInsensitiveCompare: @"torrent"] == NSOrderedSame)
|
||||
{
|
||||
torrent = YES;
|
||||
tr_ctor * ctor = tr_ctorNew(fLib);
|
||||
|
||||
Reference in New Issue
Block a user