@@ -106,11 +106,15 @@ newWithClass: isa requestedSize: [str cStringLength]]; str_c = str_c2; - if (!strncmp(str_c, "http://", 7)) { + if (!strncmp(str_c, "file://", 7)) { + scheme = @"file"; + path = [[OFString alloc] initWithCString: str_c + 7]; + return self; + } else if (!strncmp(str_c, "http://", 7)) { scheme = @"http"; str_c += 7; } else if (!strncmp(str_c, "https://", 8)) { scheme = @"https"; str_c += 8; @@ -481,10 +485,15 @@ - (OFString*)description { OFMutableString *desc = [OFMutableString stringWithFormat: @"%@://", scheme]; BOOL needPort = YES; + + if ([scheme isEqual: @"file"]) { + [desc appendString: path]; + return desc; + } if (user != nil && password != nil) [desc appendFormat: @"%@:%@@", user, password]; else if (user != nil) [desc appendFormat: @"%@@", user];