Changeset 610

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

Check to make sure the metadata isn't deleted before asking for information about the directory

Files:

Legend:

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

    r601 r610  
    113113{ 
    114114        /*Tell the metadata to get new data*/ 
    115         [metaData reloadDirectoryContents]; 
     115        if(![metaData isDeleted]) 
     116                [metaData reloadDirectoryContents]; 
    116117} 
    117118 
     
    130131        [items removeAllObjects]; 
    131132        /*Set up the dirs and files into names and the counts*/ 
    132         NSArray *dirs = [metaData directories]; 
    133         [_names addObjectsFromArray:dirs]; 
    134         NSArray *files = [metaData files]; 
    135         [_names addObjectsFromArray:files]; 
    136         dirCount = [dirs count]; 
    137         fileCount = [files count]; 
     133        if(![metaData isDeleted]) 
     134        { 
     135                NSArray *dirs = [metaData directories]; 
     136                [_names addObjectsFromArray:dirs]; 
     137                NSArray *files = [metaData files]; 
     138                [_names addObjectsFromArray:files];              
     139                dirCount = [dirs count]; 
     140                fileCount = [files count]; 
     141        } 
     142        else 
     143        { 
     144                dirCount = 0; 
     145                fileCount = 0; 
     146        } 
    138147        if(predicate != NULL) 
    139148        { 
  • branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireDirectoryMetaData.m

    r608 r610  
    539539{ 
    540540        importing |= 1; 
    541         if(!(importing & 2)
     541        if(!(importing & 2) && ![self isDeleted]
    542542                [self processNextFile]; 
    543543} 
  • branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireDirectory.h

    r599 r610  
    258258- (NSManagedObjectContext *)managedObjectContext; 
    259259 
     260/*! 
     261 * @brief Returns whether the managed object is deleted 
     262 * 
     263 * @return YES if the current directory is deleted, NO otherwise 
     264 */ 
     265- (BOOL)isDeleted; 
     266 
    260267@end 
    261268 
  • branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireEntityDirectory.m

    r598 r610  
    143143} 
    144144 
     145- (BOOL)isDeleted 
     146{ 
     147        return NO; 
     148} 
     149 
    145150- (NSString *)coverArtPath 
    146151{ 
  • branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireFilteredFileDirectory.m

    r599 r610  
    160160} 
    161161 
     162- (BOOL)isDeleted 
     163{ 
     164        return NO; 
     165} 
     166 
    162167- (NSString *)coverArtPath 
    163168{ 
  • branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireMovieDirectory.m

    r599 r610  
    155155} 
    156156 
     157- (BOOL)isDeleted 
     158{ 
     159        return NO; 
     160} 
     161 
    157162- (NSString *)path 
    158163{ 
  • branches/CoreData/SapphireFrappliance/MetaDataImporting/SapphireImporterDataMenu.m

    r606 r610  
    164164{ 
    165165        SapphireCollectionDirectory *collection = [collectionDirectories objectAtIndex:collectionIndex]; 
    166         SapphireDirectoryMetaData *meta = [collection directory]; 
    167         if([collection skipValue]) 
     166        if([collection isDeleted] || [collection skipValue]) 
    168167        { 
    169168                collectionIndex++; 
     
    171170                return; 
    172171        } 
     172           SapphireDirectoryMetaData *meta = [collection directory]; 
    173173        NSArray *skipCol = [SapphireCollectionDirectory skippedCollectionDirectoriesInContext:moc]; 
    174174        NSMutableSet *skipSet = [NSMutableSet setWithSet:[skipCol valueForKeyPath:@"directory.path"]];