Differences From Artifact [18e5b35188]:
- File
src/OFURL.m
— part of check-in
[e2f6ad3876]
at
2017-11-14 22:50:45
on branch trunk
— OFURL: Improve -[initFileURLWithPath:]
This now doesn't use -[initWithString:relativeToURL:] anymore and
properly escapes everything. (user: js, size: 21514) [annotate] [blame] [check-ins using]
To Artifact [eff43babbe]:
- File src/OFURL.m — part of check-in [8dd0438ada] at 2017-11-14 23:30:44 on branch trunk — Fix -[OFURL initFileURLWithPath:] on Windows (user: js, size: 21797) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
654 655 656 657 658 659 660 | _URLEncodedScheme = @"file"; if (![path hasPrefix: @"/"]) { OFString *currentDirectoryPath = [[OFFileManager defaultManager] currentDirectoryPath]; | > > > > > > > > | | > | 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 | _URLEncodedScheme = @"file"; if (![path hasPrefix: @"/"]) { OFString *currentDirectoryPath = [[OFFileManager defaultManager] currentDirectoryPath]; # if OF_PATH_DELIMITER != '/' currentDirectoryPath = [[currentDirectoryPath pathComponents] componentsJoinedByString: @"/"]; # endif # if defined(OF_WINDOWS) || defined(OF_DJGPP) currentDirectoryPath = [currentDirectoryPath stringByPrependingString: @"/"]; # endif path = [currentDirectoryPath stringByAppendingURLPathComponent: path]; path = [path stringByStandardizingURLPath]; } _URLEncodedPath = [[path stringByURLEncodingWithAllowedCharacters: [OFCharacterSet URLPathAllowedCharacterSet]] copy]; |
︙ | ︙ |