File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -282,19 +282,21 @@ int main(int argc, char *argv[])
282282 nmessage (ERROR_CANT_OPEN_FILE, file);
283283 return 1 ;
284284 }
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 ;
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+ }
298300 }
299301 }
300302
You can’t perform that action at this time.
0 commit comments