Overview
Comment: | Fix -[OFURL fileURLWithPath:] on Windows |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fde127afd98edbcf5453feb8a2ba3e65 |
User & Date: | js on 2017-11-13 01:42:52 |
Other Links: | manifest | tags |
Context
2017-11-13
| ||
21:56 | Add -[OFString indexOfCharacterFromSet:] check-in: 4f2b0f0847 user: js tags: trunk | |
01:42 | Fix -[OFURL fileURLWithPath:] on Windows check-in: fde127afd9 user: js tags: trunk | |
01:18 | Add OFURLHandler check-in: 31e602a476 user: js tags: trunk | |
Changes
Modified src/OFURL.m from [7b7c6c2f3c] to [1fc14e8fff].
︙ | ︙ | |||
526 527 528 529 530 531 532 533 534 535 | } - (instancetype)initFileURLWithPath: (OFString *)path isDirectory: (bool)isDirectory { @try { void *pool = objc_autoreleasePoolPush(); OFURL *currentDirectoryURL; # if OF_PATH_DELIMITER != '/' | > > > > | > > > > > | 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | } - (instancetype)initFileURLWithPath: (OFString *)path isDirectory: (bool)isDirectory { @try { void *pool = objc_autoreleasePoolPush(); # if OF_PATH_DELIMITER != '/' || defined(OF_WINDOWS) || defined(OF_DJGPP) OFArray OF_GENERIC(OFString *) *pathComponents = [path pathComponents]; # endif OFURL *currentDirectoryURL; # if OF_PATH_DELIMITER != '/' path = [pathComponents componentsJoinedByString: @"/"]; # endif # if defined(OF_WINDOWS) || defined(OF_DJGPP) if ([[pathComponents firstObject] hasSuffix: @":"]) path = [path stringByPrependingString: @"/"]; # endif if (isDirectory && ![path hasSuffix: OF_PATH_DELIMITER_STRING]) path = [path stringByAppendingString: @"/"]; currentDirectoryURL = [[OFFileManager defaultManager] currentDirectoryURL]; |
︙ | ︙ |