mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Make compatibile with a couple of MacOS-X undocumented features.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27689 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
46ddb488dc
commit
dcdcfb1a8c
2 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2009-01-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSURL.m: Compatibility tweaks for a few MacOS-X oddities...
|
||||||
|
Initialise file URLs with a host of 'localhost' even though they
|
||||||
|
should really have none.
|
||||||
|
Return paths without a trailing slash, even when they were set
|
||||||
|
with one.
|
||||||
|
|
||||||
2009-01-25 Richard Frith-Macdonald <rfm@gnu.org>
|
2009-01-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSString.m: Fix for bug #25400
|
* Source/NSString.m: Fix for bug #25400
|
||||||
|
|
|
@ -635,7 +635,7 @@ static unsigned urlAlign;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self = [self initWithScheme: NSURLFileScheme
|
self = [self initWithScheme: NSURLFileScheme
|
||||||
host: nil
|
host: @"localhost"
|
||||||
path: aPath];
|
path: aPath];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -1436,6 +1436,13 @@ static unsigned urlAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
unescape(buf, buf);
|
unescape(buf, buf);
|
||||||
|
/* Remove any trailing '/' from the path for MacOS-X compatibility.
|
||||||
|
*/
|
||||||
|
tmp = buf + strlen(buf) - 1;
|
||||||
|
if (tmp > buf && *tmp == '/')
|
||||||
|
{
|
||||||
|
*tmp = '\0';
|
||||||
|
}
|
||||||
path = [NSString stringWithUTF8String: buf];
|
path = [NSString stringWithUTF8String: buf];
|
||||||
}
|
}
|
||||||
return path;
|
return path;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue