fix for bug 35437

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34699 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2012-02-02 17:12:42 +00:00
parent fc710f36cd
commit facd75b4e1
3 changed files with 16 additions and 4 deletions

View file

@ -66,7 +66,7 @@ NSString * const NSErrorFailingURLStringKey = @"NSErrorFailingURLStringKey";
@implementation NSString (NSURLPrivate)
/* Like the normal percent escape method, but with additional characters
* escaped.
* escaped (for use by file scheme URLs).
*/
- (NSString*) _stringByAddingPercentEscapes
{
@ -708,7 +708,15 @@ static NSUInteger urlAlign;
{
NSString *aUrlString = [NSString alloc];
aPath = [aPath _stringByAddingPercentEscapes];
if ([aScheme isEqualToString: @"file"])
{
aPath = [aPath _stringByAddingPercentEscapes];
}
else
{
aPath = [aPath
stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
}
if ([aHost length] > 0)
{
NSRange r = [aHost rangeOfString: @"@"];