Changeset 9347


Ignore:
Timestamp:
Oct 21, 2009, 10:15:36 PM (13 years ago)
Author:
livings124
Message:

don't try to reveal files that don't exist

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r9342 r9347  
    14741474        }
    14751475       
    1476         [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
     1476        if ([paths count] > 0)
     1477            [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
    14771478    }
    14781479    else
  • trunk/macosx/FileOutlineController.m

    r9342 r9347  
    326326        }
    327327       
    328         [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
     328        if ([paths count])
     329            [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: paths];
    329330    }
    330331    else
  • trunk/macosx/InfoWindowController.m

    r9342 r9347  
    12101210    {
    12111211        Torrent * torrent = [fTorrents objectAtIndex: 0];
     1212        NSString * location = [torrent dataLocation];
     1213        if (!location)
     1214            return;
     1215       
    12121216        if ([NSApp isOnSnowLeopardOrBetter])
    12131217        {
    1214             NSURL * file = [NSURL fileURLWithPath: [torrent dataLocation]];
     1218            NSURL * file = [NSURL fileURLWithPath: location];
    12151219            [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs: [NSArray arrayWithObject: file]];
    12161220        }
    12171221        else
    1218             [[NSWorkspace sharedWorkspace] selectFile: [torrent dataLocation] inFileViewerRootedAtPath: nil];
     1222            [[NSWorkspace sharedWorkspace] selectFile: location inFileViewerRootedAtPath: nil];
    12191223    }
    12201224}
Note: See TracChangeset for help on using the changeset viewer.