mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Compatibility fix.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15609 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6f4da4bc68
commit
607a3f1b7d
2 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-01-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSURL.m: Support MacOS-X style initialisation using a path
|
||||||
|
with a leading slash.
|
||||||
|
|
||||||
2003-01-09 Richard Frith-Macdonald <rfm@gnu.org>
|
2003-01-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/Additions/GSCategories.m: Additional ([weekOfYear]) method
|
* Source/Additions/GSCategories.m: Additional ([weekOfYear]) method
|
||||||
|
|
|
@ -527,10 +527,23 @@ static void unescape(const char *from, char * to)
|
||||||
if ([aHost length] > 0)
|
if ([aHost length] > 0)
|
||||||
{
|
{
|
||||||
if ([aPath length] > 0)
|
if ([aPath length] > 0)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* For MacOS-X compatibility, assume a path component with
|
||||||
|
* a leading slash is intended to have that slash separating
|
||||||
|
* the host from the path as specified in the RFC1738
|
||||||
|
*/
|
||||||
|
if ([aPath hasPrefix: @"/"] == YES)
|
||||||
|
{
|
||||||
|
aUrlString = [aUrlString initWithFormat: @"%@://%@%@",
|
||||||
|
aScheme, aHost, aPath];
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
aUrlString = [aUrlString initWithFormat: @"%@://%@/%@",
|
aUrlString = [aUrlString initWithFormat: @"%@://%@/%@",
|
||||||
aScheme, aHost, aPath];
|
aScheme, aHost, aPath];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aUrlString = [aUrlString initWithFormat: @"%@://%@/",
|
aUrlString = [aUrlString initWithFormat: @"%@://%@/",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue