mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
9d1a33f8d1
commit
590043c595
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>
|
||||
|
||||
* Source/Additions/GSCategories.m: Additional ([weekOfYear]) method
|
||||
|
|
|
@ -528,8 +528,21 @@ static void unescape(const char *from, char * to)
|
|||
{
|
||||
if ([aPath length] > 0)
|
||||
{
|
||||
aUrlString = [aUrlString initWithFormat: @"%@://%@/%@",
|
||||
aScheme, aHost, aPath];
|
||||
/*
|
||||
* 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: @"%@://%@/%@",
|
||||
aScheme, aHost, aPath];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue