[paths addObject: [NSURL fileURLWithPath: location]];
}
- [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
+ if ([paths count] > 0)
+ [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
}
else
{
[paths addObject: [NSURL fileURLWithPath: path]];
}
- [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
+ if ([paths count])
+ [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
}
else
{
if ([fTorrents count] > 0)
{
Torrent * torrent = [fTorrents objectAtIndex: 0];
+ NSString * location = [torrent dataLocation];
+ if (!location)
+ return;
+
if ([NSApp isOnSnowLeopardOrBetter])
{
- NSURL * file = [NSURL fileURLWithPath: [torrent dataLocation]];
+ NSURL * file = [NSURL fileURLWithPath: location];
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: [NSArray arrayWithObject: file]];
}
else
- [[NSWorkspace sharedWorkspace] selectFile: [torrent dataLocation] inFileViewerRootedAtPath: nil];
+ [[NSWorkspace sharedWorkspace] selectFile: location inFileViewerRootedAtPath: nil];
}
}