Show
Ignore:
Timestamp:
01/08/09 21:03:22 (3 years ago)
Author:
gbooker
Message:

Switched the the next version of the metadata.
Fixes #264

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/CoreData/SapphireFrappliance/FRAppliance/SapphireApplianceController.m

    r733 r734  
    246246{ 
    247247        NSFileManager *fm = [NSFileManager defaultManager]; 
    248         NSString *storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireData"]; 
     248        NSString *storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireDataV2"]; 
    249249        BOOL exists = [fm fileExistsAtPath:storeFile]; 
    250         NSString *plistFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.plist"]; 
    251         BOOL oldExists = [fm fileExistsAtPath:plistFile]; 
     250        BOOL oldExists = [fm fileExistsAtPath:[applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireData"]]; 
     251        oldExists |= [fm fileExistsAtPath:[applicationSupportDir() stringByAppendingPathComponent:@"metaData.plist"]]; 
    252252        return !exists && oldExists; 
    253253} 
     
    257257{ 
    258258        if(storeFile == nil) 
    259                 storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireData"]; 
     259                storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireDataV2"]; 
    260260        NSFileManager *fm = [NSFileManager defaultManager]; 
    261261        [fm constructPath:[storeFile stringByDeletingLastPathComponent]]; 
     
    264264         
    265265        NSString *mopath = [[NSBundle bundleForClass:[self class]] pathForResource:@"Sapphire" ofType:@"momd"]; 
    266         mopath = [mopath stringByAppendingPathComponent:@"SapphireV1.mom"]; 
     266        mopath = [mopath stringByAppendingPathComponent:@"SapphireV2.mom"]; 
    267267        NSURL *mourl = [NSURL fileURLWithPath:mopath]; 
    268268        NSManagedObjectModel *model = [[NSManagedObjectModel alloc] initWithContentsOfURL:mourl];