32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#import "GZIPArchive.h"
#import "LHAArchive.h"
#import "TarArchive.h"
#import "ZIPArchive.h"
#import "ZooArchive.h"
#import "OFCreateDirectoryFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFReadFailedException.h"
#import "OFSeekFailedException.h"
#import "OFWriteFailedException.h"
|
>
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#import "GZIPArchive.h"
#import "LHAArchive.h"
#import "TarArchive.h"
#import "ZIPArchive.h"
#import "ZooArchive.h"
#import "OFCreateDirectoryFailedException.h"
#import "OFGetItemAttributesFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFReadFailedException.h"
#import "OFSeekFailedException.h"
#import "OFWriteFailedException.h"
|
471
472
473
474
475
476
477
478
479
480
481
482
483
484
|
[OFApplication of_activateSandbox: sandbox];
#endif
archive = [self openArchiveWithIRI: IRI
type: type
mode: mode
encoding: encoding];
if (outputDir != nil) {
OFFileManager *fileManager =
[OFFileManager defaultManager];
if (![fileManager directoryExistsAtPath: outputDir])
[fileManager createDirectoryAtPath: outputDir
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
|
[OFApplication of_activateSandbox: sandbox];
#endif
archive = [self openArchiveWithIRI: IRI
type: type
mode: mode
encoding: encoding];
#ifdef OF_MACOS
@try {
OFString *attributeName = @"com.apple.quarantine";
_quarantine = [[[OFFileManager defaultManager]
extendedAttributeDataForName: attributeName
ofItemAtIRI: IRI] retain];
} @catch (OFGetItemAttributesFailedException *e) {
if (e.errNo != /*ENOATTR*/ 93)
@throw e;
}
#endif
if (outputDir != nil) {
OFFileManager *fileManager =
[OFFileManager defaultManager];
if (![fileManager directoryExistsAtPath: outputDir])
[fileManager createDirectoryAtPath: outputDir
|
812
813
814
815
816
817
818
819
|
[path retain];
objc_autoreleasePoolPop(pool);
return [path autorelease];
}
@end
|
>
>
>
>
>
>
>
>
>
>
>
|
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
|
[path retain];
objc_autoreleasePoolPop(pool);
return [path autorelease];
}
- (void)quarantineFile: (OFString *)path
{
#ifdef OF_MACOS
if (_quarantine != nil)
[[OFFileManager defaultManager]
setExtendedAttributeData: _quarantine
forName: @"com.apple.quarantine"
ofItemAtPath: path];
#endif
}
@end
|