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:
Richard Frith-MacDonald 2009-01-25 14:58:06 +00:00
parent beae2e1e2a
commit 4fc120d2f4
2 changed files with 16 additions and 1 deletions

View file

@ -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;