mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tweak path extension handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30833 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fd58513127
commit
58cf61920a
3 changed files with 26 additions and 0 deletions
|
@ -1,4 +1,10 @@
|
|||
2010-06-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSBundle.m: When looking up paths, if no extension is provided
|
||||
then try to obtain it from the name. Mimics OSX behavior.
|
||||
|
||||
2010-06-22 David Wetzel <dave@turbocat.de>
|
||||
|
||||
* Headers/Foundation/NSFileManager.h
|
||||
* Source/NSFileManager.m
|
||||
add attributesOfItemAtPath:error:
|
||||
|
|
|
@ -1693,6 +1693,14 @@ IF_NO_GC(
|
|||
{
|
||||
ext = nil;
|
||||
}
|
||||
if (ext == nil)
|
||||
{
|
||||
ext = [name pathExtension];
|
||||
if (ext != nil)
|
||||
{
|
||||
name = [name stringByDeletingPathExtension];
|
||||
}
|
||||
}
|
||||
|
||||
pathlist = [[self _bundleResourcePathsWithRootPath: rootPath
|
||||
subPath: subPath] objectEnumerator];
|
||||
|
@ -1855,6 +1863,14 @@ IF_NO_GC(
|
|||
NSString *result = nil;
|
||||
NSArray *array;
|
||||
|
||||
if ([ext length] == 0)
|
||||
{
|
||||
ext = [name pathExtension];
|
||||
if (ext != nil)
|
||||
{
|
||||
name = [name stringByDeletingPathExtension];
|
||||
}
|
||||
}
|
||||
array = [self pathsForResourcesOfType: ext
|
||||
inDirectory: subPath
|
||||
forLocalization: localizationName];
|
||||
|
|
|
@ -1165,6 +1165,10 @@ static unsigned urlAlign;
|
|||
|
||||
[aCoder decodeValueOfObjCType: @encode(id) at: &rel];
|
||||
[aCoder decodeValueOfObjCType: @encode(id) at: &base];
|
||||
if (nil == rel)
|
||||
{
|
||||
rel = @"";
|
||||
}
|
||||
self = [self initWithString: rel relativeToURL: base];
|
||||
RELEASE(rel);
|
||||
RELEASE(base);
|
||||
|
|
Loading…
Reference in a new issue