ObjFW  Diff

Differences From Artifact [63ecae10f5]:

To Artifact [da9497b9c3]:


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
@implementation ZIPArchive
+ (void)initialize
{
	if (self == [ZIPArchive class])
		app = [[OFApplication sharedApplication] delegate];
}

+ (instancetype)archiveWithFile: (OFFile*)file
{
	return [[[self alloc] initWithFile: file] autorelease];
}

- initWithFile: (OFFile*)file
{
	self = [super init];

	@try {
		_archive = [[OFZIPArchive alloc] initWithSeekableStream: file];

	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}







|

|


|




|
>







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
@implementation ZIPArchive
+ (void)initialize
{
	if (self == [ZIPArchive class])
		app = [[OFApplication sharedApplication] delegate];
}

+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream*))stream
{
	return [[[self alloc] initWithStream: stream] autorelease];
}

- initWithStream: (OF_KINDOF(OFStream*))stream
{
	self = [super init];

	@try {
		_archive = [[OFZIPArchive alloc]
		    initWithSeekableStream: stream];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}