Overview
Comment: | OFTarArchiveEntry: Make mode/UID/GID an OFNumber
This is for consistency with OFLHAArchiveEntry. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d281c3198b4432f4641ba2c72cd76602 |
User & Date: | js on 2022-08-27 22:29:44 |
Other Links: | manifest | tags |
Context
2022-08-27
| ||
23:53 | OFArchiveEntry: Add more properties check-in: 406134b5e2 user: js tags: trunk | |
22:29 | OFTarArchiveEntry: Make mode/UID/GID an OFNumber check-in: d281c3198b user: js tags: trunk | |
21:42 | Make GCC happy again check-in: 7094055a27 user: js tags: trunk | |
Changes
Modified src/OFMutableTarArchiveEntry.h from [7139e7f4ec] to [d942abe401].
︙ | |||
28 29 30 31 32 33 34 | 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 | - + - + - + | { OF_RESERVE_IVARS(OFMutableTarArchiveEntry, 4) } /** * @brief The mode of the entry. */ |
︙ |
Modified src/OFMutableTarArchiveEntry.m from [5cc47d2692] to [c563d173e3].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - + + + | * file. */ #include "config.h" #import "OFMutableTarArchiveEntry.h" #import "OFTarArchiveEntry+Private.h" |
︙ | |||
56 57 58 59 60 61 62 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + + - + + - + + - + + - + + - + + | - (void)setFileName: (OFString *)fileName { OFString *old = _fileName; _fileName = [fileName copy]; [old release]; } |
︙ |
Modified src/OFTarArchiveEntry.h from [bbf42fa9c7] to [bbe0bc8d5f].
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + | #import "OFArchiveEntry.h" OF_ASSUME_NONNULL_BEGIN /** @file */ @class OFDate; @class OFNumber; /** * @brief The type of the archive entry. */ typedef enum { /** Normal file */ OFTarArchiveEntryTypeFile = '0', |
︙ | |||
49 50 51 52 53 54 55 | 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 81 82 83 84 85 86 87 | - + - - + - + - + | * * @brief A class which represents an entry of a tar archive. */ @interface OFTarArchiveEntry: OFObject <OFArchiveEntry, OFCopying, OFMutableCopying> { OFString *_fileName; |
︙ |
Modified src/OFTarArchiveEntry.m from [f5a88ae9e6] to [91a459baa0].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + | */ #include "config.h" #import "OFTarArchiveEntry.h" #import "OFTarArchiveEntry+Private.h" #import "OFDate.h" #import "OFNumber.h" #import "OFStream.h" #import "OFString.h" #import "OFOutOfRangeException.h" static OFString * stringFromBuffer(const unsigned char *buffer, size_t length, |
︙ | |||
79 80 81 82 83 84 85 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | + - - + + + + + + - - - - - - + + + + + + | OF_INVALID_INIT_METHOD } - (instancetype)of_init { self = [super init]; @try { |
︙ | |||
153 154 155 156 157 158 159 160 161 162 163 164 165 166 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | + + + | return self; } - (void)dealloc { [_fileName release]; [_mode release]; [_UID release]; [_GID release]; [_modificationDate release]; [_targetFileName release]; [_owner release]; [_group release]; [super dealloc]; } |
︙ | |||
195 196 197 198 199 200 201 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | - + - + - + | } - (OFString *)fileName { return _fileName; } |
︙ |
Modified utils/ofarc/TarArchive.m from [ed3299d668] to [e32d96f125].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + + | static OFArc *app; static void setPermissions(OFString *path, OFTarArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS |
︙ | |||
113 114 115 116 117 118 119 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | - - + + - - + - | if (app->_outputLevel >= 1) { OFString *date = [entry.modificationDate localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; OFString *size = [OFString stringWithFormat: @"%llu", entry.uncompressedSize]; OFString *mode = [OFString stringWithFormat: |
︙ | |||
475 476 477 478 479 480 481 | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | - + - - + + + | @"file", fileName)]; attributes = [fileManager attributesOfItemAtPath: fileName]; type = attributes.fileType; entry = [OFMutableTarArchiveEntry entryWithFileName: fileName]; #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS |
︙ |