File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed
Expand file tree Collapse file tree 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[])
276276 }
277277
278278 /* before we do anything else, make sure we can read the Propeller image file */
279- if (file) {
279+ if (file && !writeFile ) {
280280 nmessage (INFO_OPENING_FILE, file);
281281 if (!(image = Loader::readFile (file, &imageSize))) {
282282 nmessage (ERROR_CANT_OPEN_FILE, file);
283283 return 1 ;
284284 }
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 ;
300298 }
301299 }
302300
You can’t perform that action at this time.
0 commit comments