Changeset 614

Show
Ignore:
Timestamp:
07/03/08 22:33:55 (6 months ago)
Author:
gbooker
Message:

Check to make sure a file exists (this needs an error message) before playing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/CoreData/SapphireFrappliance/Browser/SapphireBrowser.m

    r610 r614  
    499499                        int fileClass=-1; 
    500500                         
    501                         if(path != 0
     501                        if(path != nil
    502502                        { 
    503503                                [reqComp addObject:[NSString stringWithFormat:@"path=%@", [[path lastPathComponent]lowercaseString]]]; 
     
    584584                } 
    585585                 
    586                 if ([currentPlayFile fileContainerTypeValue] == FILE_CONTAINER_TYPE_VIDEO_TS) 
     586                if(![[NSFileManager defaultManager] fileExistsAtPath:path]) 
     587                        path = nil; 
     588                 
     589                if([currentPlayFile fileContainerTypeValue] == FILE_CONTAINER_TYPE_VIDEO_TS && path != nil) 
    587590                { 
    588591                        BRDVDMediaAsset *asset = [[BRDVDMediaAsset alloc] initWithPath:path]; 
     
    616619                        [controller release]; 
    617620                } 
    618                 else 
     621                else if(path != nil) 
    619622                { 
    620623                        /*Audio*/ 
  • branches/CoreData/SapphireFrappliance/Extension/NSFileManager-Extensions.m

    r541 r614  
    107107- (BOOL)acceptFilePath:(NSString *)path 
    108108{ 
     109        if(path == nil) 
     110                return NO; 
    109111        NSString *name = [path lastPathComponent]; 
    110112