Overview
Comment: | Treat the leading slash of a path as a component |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a7ce7bb44102d696b6ab0051d13dcf8d |
User & Date: | js on 2018-03-13 23:05:56 |
Other Links: | manifest | tags |
Context
2018-03-17
| ||
21:53 | Add +[OFSystemInfo operatingSystem{Name,Version}] check-in: c6ed29d881 user: js tags: trunk | |
2018-03-13
| ||
23:05 | Treat the leading slash of a path as a component check-in: a7ce7bb441 user: js tags: trunk | |
2018-03-11
| ||
23:11 | OFHTTPClient: Throw if socket got closed too early check-in: 69c2ca803a user: js tags: trunk | |
Changes
Modified src/OFString+PathAdditions_UNIX.m from [223d3e3c81] to [800379d99e].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | + + + + + + + + + + + + + - + + + + + | #import "OFOutOfRangeException.h" int _OFString_PathAdditions_reference; @implementation OFString (PathAdditions) + (OFString *)pathWithComponents: (OFArray *)components { void *pool = objc_autoreleasePoolPush(); OFString *ret; if ([[components firstObject] isEqual: @"/"]) { OFMutableArray OF_GENERIC(OFString *) *mutableComponents = [[components mutableCopy] autorelease]; [mutableComponents replaceObjectAtIndex: 0 withObject: @""]; components = mutableComponents; } |
︙ | |||
56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | + + + + | [OFString stringWithUTF8String: cString + last length: i - last]]; last = i + 1; } } [ret addObject: [OFString stringWithUTF8String: cString + last length: i - last]]; if ([[ret firstObject] isEqual: @""]) [ret replaceObjectAtIndex: 0 withObject: @"/"]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } |
︙ | |||
208 209 210 211 212 213 214 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | - + - - + + + + + + + + + + + + + + + + - + - | objc_autoreleasePoolPop(pool); return [ret autorelease]; } - (OFString *)stringByStandardizingPath { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
248 249 250 251 252 253 254 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | - + + | done = false; break; } } } |
︙ |
Modified src/OFURL.m from [6014ddabe8] to [c9e9081959].
︙ | |||
962 963 964 965 966 967 968 | 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 | - - + + | if ([path hasSuffix: @"/"]) path = [path substringWithRange: of_range(0, [path length] - 1)]; #if defined(OF_WINDOWS) || defined(OF_MSDOS) path = [path substringWithRange: of_range(1, [path length] - 1)]; |
︙ |
Modified tests/OFStringTests.m from [067d094bf5] to [fa776f7eaf].
︙ | |||
617 618 619 620 621 622 623 | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | - - + + + + + + - - - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + - + - + - + - + - + - + | options: OF_STRING_SKIP_EMPTY]) && [a count] == 3 && [[a objectAtIndex: i++] isEqual: @"foo"] && [[a objectAtIndex: i++] isEqual: @"bar"] && [[a objectAtIndex: i++] isEqual: @"baz"]) #ifdef OF_HAVE_FILES |
︙ |