Differences From Artifact [e1794bea79]:
- File
utils/ofarc/LHAArchive.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: 14256) [annotate] [blame] [check-ins using] [more...]
To Artifact [f7ef0447c1]:
- File utils/ofarc/LHAArchive.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: 14700) [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 | - + + + | /* |
| ︙ | |||
259 260 261 262 263 264 265 266 267 268 269 270 271 272 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | + |
}
}
- (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];
OFLHAArchiveEntry *entry;
while ((entry = [_archive nextEntry]) != nil) {
void *pool = objc_autoreleasePoolPush();
OFString *fileName = entry.fileName;
|
| ︙ | |||
297 298 299 300 301 302 303 | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | + + + + + - + + + |
@"Extracting %[file]...",
@"file", fileName)];
if ([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.
*/
|
| ︙ | |||
367 368 369 370 371 372 373 374 375 376 377 378 379 380 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | + + + |
@"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)];
|
| ︙ |