Skip to content

Commit

Permalink
Switched to use a non-depricated createDirectoryAtPath method.
Browse files Browse the repository at this point in the history
  • Loading branch information
omh committed Aug 22, 2009
1 parent a3200c8 commit 3ba207b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Source/AppController+CoreData.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ - (NSPersistentStoreCoordinator *) persistentStoreCoordinator {

fileManager = [NSFileManager defaultManager];
applicationSupportFolder = [self applicationSupportFolder];
if ( ![fileManager fileExistsAtPath:applicationSupportFolder isDirectory:NULL] ) {
[fileManager createDirectoryAtPath:applicationSupportFolder attributes:nil];
if ( ![fileManager fileExistsAtPath:applicationSupportFolder isDirectory:NULL] )
{
[fileManager createDirectoryAtPath:applicationSupportFolder
withIntermediateDirectories:YES
attributes:nil
error:&error];
}
url = [NSURL fileURLWithPath: [applicationSupportFolder stringByAppendingPathComponent: @"Clyppan.sql"]];

persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: [self managedObjectModel]];
Expand Down

0 comments on commit 3ba207b

Please sign in to comment.