Differences From Artifact [06ca9c602c]:
- File
src/OFFileManager.m
— part of check-in
[d133fa0a89]
at
2018-02-11 14:33:16
on branch trunk
— Add exception for currentDirectoryPath failing
This also changes OFFileManager to use a buffer with getcwd() rather
than depending on the extension that passing NULL as a buffer will
allocate one. (user: js, size: 21951) [annotate] [blame] [check-ins using]
To Artifact [85bf245254]:
- File src/OFFileManager.m — part of check-in [86b1caa4d2] at 2018-02-11 15:12:58 on branch trunk — Fix DJGPP's getcwd() returning forward slashes (user: js, size: 22195) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
161 162 163 164 165 166 167 168 169 170 171 172 173 174 | encoding: [OFLocalization encoding]]; #else char buffer[PATH_MAX]; if ((getcwd(buffer, PATH_MAX)) == NULL) @throw [OFGetCurrentDirectoryPathFailedException exceptionWithErrNo: errno]; return [OFString stringWithCString: buffer encoding: [OFLocalization encoding]]; #endif } - (OFURL *)currentDirectoryURL | > > > > > > > > > > | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | encoding: [OFLocalization encoding]]; #else char buffer[PATH_MAX]; if ((getcwd(buffer, PATH_MAX)) == NULL) @throw [OFGetCurrentDirectoryPathFailedException exceptionWithErrNo: errno]; # ifdef OF_DJGPP /* * For some reason, getcwd() returns forward slashes on DJGPP, even * though the native format is to use backwards slashes. */ for (char *tmp = buffer; *tmp != '\0'; tmp++) if (*tmp == '/') *tmp = '\\'; # endif return [OFString stringWithCString: buffer encoding: [OFLocalization encoding]]; #endif } - (OFURL *)currentDirectoryURL |
︙ | ︙ |