mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-27 14:00:22 +00:00
NSBundle URLForResource fix
This commit is contained in:
parent
67ab18d56d
commit
2fda5f3f53
@ -651,7 +651,8 @@ static NSMapTable *pathToObject=NULL;
|
||||
- (NSURL *)URLForResource:(NSString *)name withExtension:(NSString *)extension {
|
||||
NSString *path = [self pathForResource:name ofType:extension inDirectory:nil];
|
||||
|
||||
return [NSURL fileURLWithPath:path];
|
||||
// attention: fileURLWithPath returns a non-nil object for nil input, we don't want that
|
||||
return path ? [NSURL fileURLWithPath:path] : nil;
|
||||
}
|
||||
|
||||
-(NSArray *)pathsForResourcesOfType:(NSString *)type inDirectory:(NSString *)path forLocalization:(NSString *)localization {
|
||||
|
Loading…
Reference in New Issue
Block a user