Differences From Artifact [62cdc3890f]:
- File src/OFLHAArchiveEntry.m — part of check-in [56d02a1ac5] at 2018-05-27 00:21:18 on branch trunk — OFLHAArchiveEntry: Parse more extensions (user: js, size: 10208) [annotate] [blame] [check-ins using]
To Artifact [e8d94333d8]:
- File
src/OFLHAArchiveEntry.m
— part of check-in
[5c4470fb42]
at
2018-05-27 00:48:16
on branch trunk
— OFLHAArchiveEntry: Improve directory name parsing
This now works with UTF-8 encoded directory names. (user: js, size: 10260) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
45 46 47 48 49 50 51 | } static void parseDirectoryNameExtension(OFLHAArchiveEntry *entry, OFData *extension, of_string_encoding_t encoding) { void *pool = objc_autoreleasePoolPush(); | > > | | | > > > | | | | | < > < < > | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | } static void parseDirectoryNameExtension(OFLHAArchiveEntry *entry, OFData *extension, of_string_encoding_t encoding) { void *pool = objc_autoreleasePoolPush(); OFMutableData *data = [[extension mutableCopy] autorelease]; char *items = [data items]; size_t count = [data count]; OFMutableString *directoryName; for (size_t i = 1; i < count; i++) if (items[i] == '\xFF') items[i] = '/'; directoryName = [OFMutableString stringWithCString: items + 1 encoding: encoding length: count - 1]; if (![directoryName hasSuffix: @"/"]) [directoryName appendString: @"/"]; [directoryName makeImmutable]; [entry->_directoryName release]; entry->_directoryName = nil; entry->_directoryName = [directoryName copy]; objc_autoreleasePoolPop(pool); } static void parseCommentExtension(OFLHAArchiveEntry *entry, OFData *extension, of_string_encoding_t encoding) |
︙ | ︙ |