mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor mod ... hack for compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14321 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
56d2b4000a
commit
e851388aa5
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-08-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSURL.m: Hack for compatibility with MacOS-X in returning
|
||||
path of a file URL ... the RFC says we shouldn't.
|
||||
|
||||
2002-08-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSFileManager.m: Fix typo ... missing closing brace under
|
||||
|
|
|
@ -577,7 +577,7 @@ static void unescape(const char *from, char * to)
|
|||
}
|
||||
|
||||
/** <init />
|
||||
* Iinitialised susing aUrlString and aBaseUrl. The value of aBaseUrl
|
||||
* Initialised using aUrlString and aBaseUrl. The value of aBaseUrl
|
||||
* may be nil, but aUrlString must be non-nil.<br />
|
||||
* If the string cannot be parsed the method returns nil.
|
||||
*/
|
||||
|
@ -628,7 +628,7 @@ static void unescape(const char *from, char * to)
|
|||
*ptr = '\0'; // Terminate it.
|
||||
end = &ptr[1];
|
||||
/*
|
||||
* Standardise upprcase to lower.
|
||||
* Standardise uppercase to lower.
|
||||
*/
|
||||
while (--ptr > start)
|
||||
{
|
||||
|
@ -1175,7 +1175,9 @@ static void unescape(const char *from, char * to)
|
|||
* NB. This does not conform strictly to the RFCs, in that it includes a
|
||||
* leading slash ('/') character (wheras the path part of a URL strictly
|
||||
* should not) and the interpretation of non-ascii character is (strictly
|
||||
* speaking) undefined.
|
||||
* speaking) undefined.<br />
|
||||
* Also, this breaks strict conformance in that a URL of file scheme is
|
||||
* treated as having a path (contrary to RFCs)
|
||||
*/
|
||||
- (NSString*) path
|
||||
{
|
||||
|
@ -1229,6 +1231,11 @@ static void unescape(const char *from, char * to)
|
|||
unescape(buf, buf);
|
||||
path = [NSString stringWithUTF8String: buf];
|
||||
}
|
||||
else if (myData->scheme != 0 && myData->path != 0
|
||||
&& strcmp(myData->scheme, "file") == 0)
|
||||
{
|
||||
path = [NSString stringWithUTF8String: myData->path];
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue