File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Extensions/CoreDataStorage Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -452,9 +452,11 @@ - (NSString *)persistentStoreDirectory
452452 // Previously the Peristent Story Directory was based on the Bundle Display Name but this can be Localized
453453 // If Peristent Story Directory already exists we will use that
454454 NSString *bundleDisplayName = [[NSBundle mainBundle ] objectForInfoDictionaryKey: @" CFBundleDisplayName" ];
455- NSString *legacyPersistentStoreDirectory = [basePath stringByAppendingPathComponent: bundleDisplayName];
456- if ([fileManager fileExistsAtPath: legacyPersistentStoreDirectory]) {
457- return legacyPersistentStoreDirectory;
455+ if (bundleDisplayName) {
456+ NSString *legacyPersistentStoreDirectory = [basePath stringByAppendingPathComponent: bundleDisplayName];
457+ if ([fileManager fileExistsAtPath: legacyPersistentStoreDirectory]) {
458+ return legacyPersistentStoreDirectory;
459+ }
458460 }
459461
460462 // Peristent Story Directory now uses the Bundle Identifier
You can’t perform that action at this time.
0 commit comments