Index: src/OFMutableIRI.m ================================================================== --- src/OFMutableIRI.m +++ src/OFMutableIRI.m @@ -322,19 +322,22 @@ return copy; } - (void)appendPathComponent: (OFString *)component { - bool isDirectory = false; + [self appendPathComponent: component isDirectory: false]; #ifdef OF_HAVE_FILES if ([_scheme isEqual: @"file"] && - [[OFFileManager defaultManager] directoryExistsAtIRI: self]) - isDirectory = true; + ![_percentEncodedPath hasSuffix: @"/"] && + [[OFFileManager defaultManager] directoryExistsAtIRI: self]) { + OFString *path = [[_percentEncodedPath + stringByAppendingString: @"/"] retain]; + [_percentEncodedPath release]; + _percentEncodedPath = path; + } #endif - - [self appendPathComponent: component isDirectory: isDirectory]; } - (void)appendPathComponent: (OFString *)component isDirectory: (bool)isDirectory {