ObjFW  Check-in [0909bbc678]

Overview
Comment:OFZIP: Accept .GZ (uppercase) files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0909bbc67890a841be921d2e07111940948d902359ccb2c64eb4969f0d04b21e
User & Date: js on 2016-05-16 11:45:50
Other Links: manifest | tags
Context
2016-05-16
13:44
OFZIP: Add a mode for printing files check-in: fed68f8fd5 user: js tags: trunk
11:45
OFZIP: Accept .GZ (uppercase) files check-in: 0909bbc678 user: js tags: trunk
11:14
Minor documentation improvements check-in: 5a3133f9d8 user: js tags: trunk
Changes

Modified utils/ofzip/OFZIP.m from [e55440f44b] to [5ee35aa87f].

209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
	} @catch (OFOpenItemFailedException *e) {
		[of_stderr writeFormat: @"Failed to open file %@: %s\n",
					[e path], strerror([e errNo])];
		[OFApplication terminateWithStatus: 1];
	}

	@try {
		if ([path hasSuffix: @".gz"])
			archive = [GZIPArchive archiveWithFile: file];
		else
			archive = [ZIPArchive archiveWithFile: file];
	} @catch (OFReadFailedException *e) {
		[of_stderr writeFormat: @"Failed to read file %@: %s\n",
					path, strerror([e errNo])];
		[OFApplication terminateWithStatus: 1];







|







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
	} @catch (OFOpenItemFailedException *e) {
		[of_stderr writeFormat: @"Failed to open file %@: %s\n",
					[e path], strerror([e errNo])];
		[OFApplication terminateWithStatus: 1];
	}

	@try {
		if ([path hasSuffix: @".gz"] || [path hasSuffix: @".GZ"])
			archive = [GZIPArchive archiveWithFile: file];
		else
			archive = [ZIPArchive archiveWithFile: file];
	} @catch (OFReadFailedException *e) {
		[of_stderr writeFormat: @"Failed to read file %@: %s\n",
					path, strerror([e errNo])];
		[OFApplication terminateWithStatus: 1];