125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
OFSandbox *sandbox = [OFSandbox sandbox];
@try {
sandbox.allowsStdIO = true;
sandbox.allowsReadingFiles = true;
sandbox.allowsUserDatabaseReading = true;
for (OFString *path in optionsParser.remainingArguments)
[sandbox unveilPath: path
permissions: @"r"];
[sandbox unveilPath: @LANGUAGE_DIR
permissions: @"r"];
[OFApplication activateSandbox: sandbox];
} @finally {
[sandbox release];
}
#endif
|
|
<
|
<
|
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 permissions: @"r"];
[sandbox unveilPath: @LANGUAGE_DIR 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
|
void *pool = objc_autoreleasePoolPush();
OFStream *file;
if ([path isEqual: @"-"])
file = of_stdin;
else {
@try {
file = [OFFile fileWithPath: path
mode: @"r"];
} @catch (OFOpenItemFailedException *e) {
OFString *error = [OFString
stringWithCString: strerror(e.errNo)
encoding: [OFLocale encoding]];
[of_stderr writeLine: OF_LOCALIZED(
@"failed_to_open_file",
|
|
<
|
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 mode: @"r"];
} @catch (OFOpenItemFailedException *e) {
OFString *error = [OFString
stringWithCString: strerror(e.errNo)
encoding: [OFLocale encoding]];
[of_stderr writeLine: OF_LOCALIZED(
@"failed_to_open_file",
|