ObjFW  Diff

Differences From Artifact [aa03d9ef76]:

To Artifact [fe019671c9]:


125
126
127
128
129
130
131
132

133
134
135

136
137
138
139
140
141
142
143
125
126
127
128
129
130
131

132

133

134

135
136
137
138
139
140
141







-
+
-

-
+
-







	OFSandbox *sandbox = [OFSandbox sandbox];
	@try {
		sandbox.allowsStdIO = true;
		sandbox.allowsReadingFiles = true;
		sandbox.allowsUserDatabaseReading = true;

		for (OFString *path in optionsParser.remainingArguments)
			[sandbox unveilPath: path
			[sandbox unveilPath: path permissions: @"r"];
				permissions: @"r"];

		[sandbox unveilPath: @LANGUAGE_DIR
		[sandbox unveilPath: @LANGUAGE_DIR permissions: @"r"];
			permissions: @"r"];

		[OFApplication activateSandbox: sandbox];
	} @finally {
		[sandbox release];
	}
#endif

174
175
176
177
178
179
180
181

182
183
184
185
186
187
188
189
172
173
174
175
176
177
178

179

180
181
182
183
184
185
186







-
+
-







		void *pool = objc_autoreleasePoolPush();
		OFStream *file;

		if ([path isEqual: @"-"])
			file = of_stdin;
		else {
			@try {
				file = [OFFile fileWithPath: path
				file = [OFFile fileWithPath: path mode: @"r"];
						       mode: @"r"];
			} @catch (OFOpenItemFailedException *e) {
				OFString *error = [OFString
				    stringWithCString: strerror(e.errNo)
					     encoding: [OFLocale encoding]];

				[of_stderr writeLine: OF_LOCALIZED(
				    @"failed_to_open_file",