- Timestamp:
- 01/08/09 21:03:22 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/CoreData/SapphireFrappliance/FRAppliance/SapphireApplianceController.m
r733 r734 246 246 { 247 247 NSFileManager *fm = [NSFileManager defaultManager]; 248 NSString *storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireData "];248 NSString *storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireDataV2"]; 249 249 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"]]; 252 252 return !exists && oldExists; 253 253 } … … 257 257 { 258 258 if(storeFile == nil) 259 storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireData "];259 storeFile = [applicationSupportDir() stringByAppendingPathComponent:@"metaData.sapphireDataV2"]; 260 260 NSFileManager *fm = [NSFileManager defaultManager]; 261 261 [fm constructPath:[storeFile stringByDeletingLastPathComponent]]; … … 264 264 265 265 NSString *mopath = [[NSBundle bundleForClass:[self class]] pathForResource:@"Sapphire" ofType:@"momd"]; 266 mopath = [mopath stringByAppendingPathComponent:@"SapphireV 1.mom"];266 mopath = [mopath stringByAppendingPathComponent:@"SapphireV2.mom"]; 267 267 NSURL *mourl = [NSURL fileURLWithPath:mopath]; 268 268 NSManagedObjectModel *model = [[NSManagedObjectModel alloc] initWithContentsOfURL:mourl];
