Differences From Artifact [bcca1cec46]:
- File
src/OFFileManager.m
— part of check-in
[b31bd48f90]
at
2018-05-26 14:49:26
on branch trunk
— Remove #define INTUITION_CLASSES_H hack
This has been fixed upstream in amiga-gcc. (user: js, size: 21952) [annotate] [blame] [check-ins using]
To Artifact [b0943bb0f4]:
- File src/OFFileManager.m — part of check-in [aa0384d1bf] at 2018-07-28 18:45:36 on branch trunk — Rename OFLocalization -> OFLocale (user: js, size: 21922) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
28 29 30 31 32 33 34 | #endif #import "OFArray.h" #import "OFDate.h" #import "OFDictionary.h" #import "OFFile.h" #import "OFFileManager.h" | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #endif #import "OFArray.h" #import "OFDate.h" #import "OFDictionary.h" #import "OFFile.h" #import "OFFileManager.h" #import "OFLocale.h" #import "OFNumber.h" #import "OFString.h" #import "OFSystemInfo.h" #import "OFURL.h" #import "OFURLHandler.h" #import "OFChangeCurrentDirectoryPathFailedException.h" |
︙ | ︙ | |||
159 160 161 162 163 164 165 | if (IoErr() == ERROR_LINE_TOO_LONG) @throw [OFOutOfRangeException exception]; return nil; } return [OFString stringWithCString: buffer | | | | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | if (IoErr() == ERROR_LINE_TOO_LONG) @throw [OFOutOfRangeException exception]; return nil; } return [OFString stringWithCString: buffer encoding: [OFLocale 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: [OFLocale encoding]]; #endif } - (OFURL *)currentDirectoryURL { void *pool = objc_autoreleasePoolPush(); OFURL *ret; |
︙ | ︙ | |||
405 406 407 408 409 410 411 | if (_wchdir([path UTF16String]) != 0) @throw [OFChangeCurrentDirectoryPathFailedException exceptionWithPath: path errNo: errno]; #elif defined(OF_AMIGAOS) BPTR lock, oldLock; | | | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | if (_wchdir([path UTF16String]) != 0) @throw [OFChangeCurrentDirectoryPathFailedException exceptionWithPath: path errNo: errno]; #elif defined(OF_AMIGAOS) BPTR lock, oldLock; if ((lock = Lock([path cStringWithEncoding: [OFLocale encoding]], SHARED_LOCK)) == 0) { int errNo; switch (IoErr()) { case ERROR_OBJECT_IN_USE: case ERROR_DISK_NOT_VALIDATED: errNo = EBUSY; |
︙ | ︙ | |||
436 437 438 439 440 441 442 | if (!dirChanged) originalDirLock = oldLock; else UnLock(oldLock); dirChanged = true; #else | | | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | if (!dirChanged) originalDirLock = oldLock; else UnLock(oldLock); dirChanged = true; #else if (chdir([path cStringWithEncoding: [OFLocale encoding]]) != 0) @throw [OFChangeCurrentDirectoryPathFailedException exceptionWithPath: path errNo: errno]; #endif } - (void)changeCurrentDirectoryURL: (OFURL *)URL |
︙ | ︙ |