Changeset 4718

Show
Ignore:
Timestamp:
04/24/07 16:56:21 (2 years ago)
Author:
morris
Message:

Fix opening of files/folders

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/FHApplicationController.m

    r4716 r4718  
    255255 
    256256- (BOOL)application:(NSApplication *)application openFile:(NSString *)path { 
    257         NSString        *file; 
    258         WIURL           *url; 
    259         Class           class; 
    260          
    261         url             = [WIURL fileURLWithPath:path]; 
    262         class   = [FHHandler handlerForURL:url]; 
    263          
    264         if([class handlesURLAsDirectory:url]) { 
    265 //              [self _loadURL:url]; 
    266         } else { 
    267                 file    = [path lastPathComponent]; 
    268                 url             = [WIURL fileURLWithPath:[path stringByDeletingLastPathComponent]]; 
    269  
    270                 if(![FHHandler handlerForURL:url]) 
    271                         return NO; 
    272  
    273 //              [self _loadURL:url selectFile:file]; 
    274         } 
     257        [_browserController loadURL:[WIURL fileURLWithPath:path]]; 
    275258         
    276259        _openLastURL = NO; 
  • Footagehead/trunk/FHBrowserController.m

    r4717 r4718  
    10621062 
    10631063- (void)loadURL:(WIURL *)url { 
    1064         [self _loadURL:url]; 
     1064        NSString        *file; 
     1065        Class           class; 
     1066         
     1067        class = [FHHandler handlerForURL:url]; 
     1068         
     1069        if([class handlesURLAsDirectory:url]) { 
     1070                [self _loadURL:url]; 
     1071        } else { 
     1072                file    = [[url path] lastPathComponent]; 
     1073                url             = [WIURL fileURLWithPath:[[url path] stringByDeletingLastPathComponent]]; 
     1074 
     1075                if(![FHHandler handlerForURL:url]) 
     1076                        return; 
     1077 
     1078                [self _loadURL:url selectFile:file]; 
     1079        } 
     1080 
     1081        [self showFile:[self selectedFile]]; 
    10651082} 
    10661083