mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
beae2e1e2a
commit
4fc120d2f4
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>
|
||||
|
||||
* Source/NSString.m: Fix for bug #25400
|
||||
|
|
|
@ -635,7 +635,7 @@ static unsigned urlAlign;
|
|||
}
|
||||
}
|
||||
self = [self initWithScheme: NSURLFileScheme
|
||||
host: nil
|
||||
host: @"localhost"
|
||||
path: aPath];
|
||||
return self;
|
||||
}
|
||||
|
@ -1436,6 +1436,13 @@ static unsigned urlAlign;
|
|||
}
|
||||
|
||||
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];
|
||||
}
|
||||
return path;
|
||||
|
|
Loading…
Reference in a new issue