File tree 1 file changed +14
-16
lines changed
1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -276,27 +276,25 @@ int main(int argc, char *argv[])
276
276
}
277
277
278
278
/* before we do anything else, make sure we can read the Propeller image file */
279
- if (file) {
279
+ if (file && !writeFile ) {
280
280
nmessage (INFO_OPENING_FILE, file);
281
281
if (!(image = Loader::readFile (file, &imageSize))) {
282
282
nmessage (ERROR_CANT_OPEN_FILE, file);
283
283
return 1 ;
284
284
}
285
- if (!writeFile) {
286
- switch (PropImage::validate (image, imageSize)) {
287
- case PropImage::SUCCESS:
288
- // success
289
- break ;
290
- case PropImage::IMAGE_TRUNCATED:
291
- nmessage (ERROR_FILE_TRUNCATED);
292
- return 1 ;
293
- case PropImage::IMAGE_CORRUPTED:
294
- nmessage (ERROR_FILE_CORRUPTED);
295
- return 1 ;
296
- default :
297
- nmessage (ERROR_INTERNAL_CODE_ERROR);
298
- return 1 ;
299
- }
285
+ switch (PropImage::validate (image, imageSize)) {
286
+ case PropImage::SUCCESS:
287
+ // success
288
+ break ;
289
+ case PropImage::IMAGE_TRUNCATED:
290
+ nmessage (ERROR_FILE_TRUNCATED);
291
+ return 1 ;
292
+ case PropImage::IMAGE_CORRUPTED:
293
+ nmessage (ERROR_FILE_CORRUPTED);
294
+ return 1 ;
295
+ default :
296
+ nmessage (ERROR_INTERNAL_CODE_ERROR);
297
+ return 1 ;
300
298
}
301
299
}
302
300
You can’t perform that action at this time.
0 commit comments