Differences From Artifact [67f5b716a2]:
- File
utils/ofarc/TarArchive.m
— part of check-in
[f2109cf1c3]
at
2023-07-22 14:47:51
on branch trunk
— utils/ofarc: Pass the path of the archive
This is in preparation for supporting split archives. (user: js, size: 15697) [annotate] [blame] [check-ins using] [more...]
To Artifact [bcc24ae359]:
- File utils/ofarc/TarArchive.m — part of check-in [f007fe7b02] at 2024-03-02 11:41:32 on branch trunk — ofarc: Delay setting modified date of directories (user: js, size: 16141) [annotate] [blame] [check-ins using] [more...]
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + + + | /* |
︙ | |||
280 281 282 283 284 285 286 287 288 289 290 291 292 293 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | + | } } - (void)extractFiles: (OFArray OF_GENERIC(OFString *) *)files { OFFileManager *fileManager = [OFFileManager defaultManager]; bool all = (files.count == 0); OFMutableArray *delayedModificationDates = [OFMutableArray array]; OFMutableSet OF_GENERIC(OFString *) *missing = [OFMutableSet setWithArray: files]; OFTarArchiveEntry *entry; while ((entry = [_archive nextEntry]) != nil) { void *pool = objc_autoreleasePoolPush(); OFString *fileName = entry.fileName; |
︙ | |||
331 332 333 334 335 336 337 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | + + + + + - + + + | if (type == OFTarArchiveEntryTypeDirectory || (type == OFTarArchiveEntryTypeFile && [fileName hasSuffix: @"/"])) { [fileManager createDirectoryAtPath: outFileName createParents: true]; setPermissions(outFileName, entry); /* * As creating a new file in a directory changes its * modification date, we can only set it once all files * have been created. */ |
︙ | |||
401 402 403 404 405 406 407 408 409 410 411 412 413 414 | 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | + + + | @"file", fileName)]; } outer_loop_end: objc_autoreleasePoolPop(pool); } for (OFPair *pair in delayedModificationDates) setModificationDate(pair.firstObject, pair.secondObject); if (missing.count > 0) { for (OFString *file in missing) [OFStdErr writeLine: OF_LOCALIZED( @"file_not_in_archive", @"File %[file] is not in the archive!", @"file", file)]; |
︙ |