mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Fix to get NSURL -resourceSpecifier regression tests to pass again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31849 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
33620c771d
commit
53157fa22c
2 changed files with 14 additions and 5 deletions
|
@ -1,6 +1,8 @@
|
||||||
2011-01-07 Richard Frith-Macdonald <rfm@gnu.org>
|
2011-01-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSObject.m: Make zombie log message match current OSX.
|
* Source/NSObject.m: Make zombie log message match current OSX.
|
||||||
|
* Source/NSURL.m: Fix -resourceSpecifier by removing incorrect
|
||||||
|
special handling for file URLs.
|
||||||
|
|
||||||
2011-01-06 Fred Kiefer <FredKiefer@gmx.de>
|
2011-01-06 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
|
|
@ -1770,12 +1770,19 @@ static unsigned urlAlign;
|
||||||
if (range.length > 0)
|
if (range.length > 0)
|
||||||
{
|
{
|
||||||
NSString *specifier;
|
NSString *specifier;
|
||||||
/* MacOSX compatibility - file schemes just return the path (without
|
|
||||||
the "//") but everything else returns the whole specifier */
|
/* MacOSX compatibility - in the case where there is no
|
||||||
if ([[self scheme] isEqual: @"file"])
|
* host in the URL, just return the path (without the "//").
|
||||||
specifier = [_urlString substringFromIndex: NSMaxRange(range)];
|
* For all other cases we return the whole specifier.
|
||||||
|
*/
|
||||||
|
if (nil == [self host])
|
||||||
|
{
|
||||||
|
specifier = [_urlString substringFromIndex: NSMaxRange(range)];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
specifier = [_urlString substringFromIndex: range.location+1];
|
{
|
||||||
|
specifier = [_urlString substringFromIndex: range.location+1];
|
||||||
|
}
|
||||||
return specifier;
|
return specifier;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue