mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Make the use of nil for a file URL path raise an invalid argument exception
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33939 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4b08c19756
commit
c71ffe21e9
4 changed files with 33 additions and 4 deletions
|
@ -1899,10 +1899,17 @@ IF_NO_GC(
|
|||
subdirectory: (NSString *)subpath
|
||||
localization: (NSString *)localizationName
|
||||
{
|
||||
return [NSURL fileURLWithPath: [self pathForResource: name
|
||||
ofType: ext
|
||||
inDirectory: subpath
|
||||
forLocalization: localizationName]];
|
||||
NSString *path;
|
||||
|
||||
path = [self pathForResource: name
|
||||
ofType: ext
|
||||
inDirectory: subpath
|
||||
forLocalization: localizationName];
|
||||
if (nil == path)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
return [NSURL fileURLWithPath: path];
|
||||
}
|
||||
|
||||
+ (NSArray*) _pathsForResourcesOfType: (NSString*)extension
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue