Differences From Artifact [66df8d1952]:
- File src/OFString.m — part of check-in [a06354b42a] at 2017-10-22 15:05:39 on branch trunk — Make Apple GCC with -Wshadow happy (user: js, size: 66345) [annotate] [blame] [check-ins using]
To Artifact [e0c9985c5f]:
- File
src/OFString.m
— part of check-in
[b83d1414b1]
at
2017-10-29 00:41:52
on branch trunk
— Fix conversion between URL and path on Win32
This also adds -[OFURL fileSystemRepresentation] to correctly convert a
URL back to a path in the local file system. (user: js, size: 66069) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
1037 1038 1039 1040 1041 1042 1043 | OFString *scheme = [URL scheme]; # ifdef OF_HAVE_FILES if ([scheme isEqual: @"file"]) { if (encoding == OF_STRING_ENCODING_AUTODETECT) encoding = OF_STRING_ENCODING_UTF_8; | | > | | 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | OFString *scheme = [URL scheme]; # ifdef OF_HAVE_FILES if ([scheme isEqual: @"file"]) { if (encoding == OF_STRING_ENCODING_AUTODETECT) encoding = OF_STRING_ENCODING_UTF_8; self = [self initWithContentsOfFile: [URL fileSystemRepresentation] encoding: encoding]; } else # endif @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; objc_autoreleasePoolPop(pool); return self; |
︙ | ︙ | |||
2203 2204 2205 2206 2207 2208 2209 | if (OF_IS_PATH_DELIMITER(characters[i])) { [ret addObject: [self substringWithRange: of_range(last, i - last)]]; last = i + 1; } } | < < < < < < < < < < < < | 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 | if (OF_IS_PATH_DELIMITER(characters[i])) { [ret addObject: [self substringWithRange: of_range(last, i - last)]]; last = i + 1; } } [ret addObject: [self substringWithRange: of_range(last, i - last)]]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } |
︙ | ︙ |