Handle case where scheme is missing from the URL.

This commit is contained in:
fredkiefer 2020-01-24 23:27:30 +01:00
parent 4cbf07b4ae
commit d1d9cd65a1
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2020-01-23 Fred Kiefer <fredkiefer@gmx.de>
* Source/Additions/NSURL+GNUstepBase.m: Handle case where scheme
is missing from the URL.
2020-01-20 Fred Kiefer <fredkiefer@gmx.de>
* Source/NSPredicate.m: Allow simple predicates on NSDate.

View file

@ -64,8 +64,15 @@
NSMutableString *urlString;
NSString *s;
urlString = [scheme mutableCopy];
[urlString appendString: @"://"];
if (scheme != nil)
{
urlString = [scheme mutableCopy];
[urlString appendString: @"://"];
}
else
{
urlString = [[NSMutableString alloc] init];
}
if ([user length] > 0 || [password length] > 0)
{
if (nil == (s = user)) s = @"";