mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +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
ad1eff6603
commit
38c9e91657
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>
|
2010-06-22 David Wetzel <dave@turbocat.de>
|
||||||
|
|
||||||
* Headers/Foundation/NSFileManager.h
|
* Headers/Foundation/NSFileManager.h
|
||||||
* Source/NSFileManager.m
|
* Source/NSFileManager.m
|
||||||
add attributesOfItemAtPath:error:
|
add attributesOfItemAtPath:error:
|
||||||
|
|
|
@ -1693,6 +1693,14 @@ IF_NO_GC(
|
||||||
{
|
{
|
||||||
ext = nil;
|
ext = nil;
|
||||||
}
|
}
|
||||||
|
if (ext == nil)
|
||||||
|
{
|
||||||
|
ext = [name pathExtension];
|
||||||
|
if (ext != nil)
|
||||||
|
{
|
||||||
|
name = [name stringByDeletingPathExtension];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pathlist = [[self _bundleResourcePathsWithRootPath: rootPath
|
pathlist = [[self _bundleResourcePathsWithRootPath: rootPath
|
||||||
subPath: subPath] objectEnumerator];
|
subPath: subPath] objectEnumerator];
|
||||||
|
@ -1855,6 +1863,14 @@ IF_NO_GC(
|
||||||
NSString *result = nil;
|
NSString *result = nil;
|
||||||
NSArray *array;
|
NSArray *array;
|
||||||
|
|
||||||
|
if ([ext length] == 0)
|
||||||
|
{
|
||||||
|
ext = [name pathExtension];
|
||||||
|
if (ext != nil)
|
||||||
|
{
|
||||||
|
name = [name stringByDeletingPathExtension];
|
||||||
|
}
|
||||||
|
}
|
||||||
array = [self pathsForResourcesOfType: ext
|
array = [self pathsForResourcesOfType: ext
|
||||||
inDirectory: subPath
|
inDirectory: subPath
|
||||||
forLocalization: localizationName];
|
forLocalization: localizationName];
|
||||||
|
|
|
@ -1165,6 +1165,10 @@ static unsigned urlAlign;
|
||||||
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &rel];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &rel];
|
||||||
[aCoder decodeValueOfObjCType: @encode(id) at: &base];
|
[aCoder decodeValueOfObjCType: @encode(id) at: &base];
|
||||||
|
if (nil == rel)
|
||||||
|
{
|
||||||
|
rel = @"";
|
||||||
|
}
|
||||||
self = [self initWithString: rel relativeToURL: base];
|
self = [self initWithString: rel relativeToURL: base];
|
||||||
RELEASE(rel);
|
RELEASE(rel);
|
||||||
RELEASE(base);
|
RELEASE(base);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue