Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Krivoblotsky committed Jun 2, 2015
1 parent b80e87a commit 4ed186d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Pod/Classes/HCDCoreDataStack.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ - (NSURL *)_defaultStoreURL
return [libraryURL URLByAppendingPathComponent:self.modelName];
#else
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSString *bundleIdentifier = [[bundle infoDictionary] objectForKey:kCFBundleIdentifierKey];
NSString *bundleIdentifier = [[bundle infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey];
NSURL *appSupportURL = [[[NSFileManager defaultManager] URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask] lastObject];
appSupportURL = [appSupportURL URLByAppendingPathComponent:bundleIdentifier];

NSError *error = nil;
NSDictionary *properties = [appSupportURL resourceValuesForKeys:@[NSURLIsDirectoryKey] error:&error];

if (error.code == NSFileReadNoSuchFileError) {
[fileManager createDirectoryAtPath:appSupportURL.path withIntermediateDirectories:YES attributes:nil error:&error];
}
Expand Down

0 comments on commit 4ed186d

Please sign in to comment.