Better handling of attempt to manipulate non-existent ISO image
This commit is contained in:
@ -443,6 +443,7 @@ int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag)
|
||||
xorriso->in_volset_handle= NULL;
|
||||
xorriso->loaded_volid[0]= 0;
|
||||
xorriso->volset_change_pending= 0;
|
||||
xorriso->no_volset_present= 0;
|
||||
}
|
||||
|
||||
ret= isoburn_ropt_new(&ropts, 0);
|
||||
@ -464,6 +465,7 @@ int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag)
|
||||
xorriso->in_volset_handle= (void *) volset;
|
||||
Xorriso_update_volid(xorriso, 0);
|
||||
xorriso->volset_change_pending= 0;
|
||||
xorriso->no_volset_present= 0;
|
||||
return(1);
|
||||
}
|
||||
|
||||
@ -706,7 +708,7 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
|
||||
xorriso->in_volset_handle= NULL;
|
||||
xorriso->loaded_volid[0]= 0;
|
||||
xorriso->volset_change_pending= 0;
|
||||
|
||||
xorriso->no_volset_present= 0;
|
||||
in_is_out_too= 0;
|
||||
}
|
||||
if((flag&2) && xorriso->out_drive_handle!=NULL) {
|
||||
@ -1257,10 +1259,13 @@ int Xorriso_get_volume(struct XorrisO *xorriso, IsoImage **volume,
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
||||
" Possible program error with drive '%s'.", xorriso->indev);
|
||||
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
if(!xorriso->no_volset_present)
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
xorriso->no_volset_present= 1;
|
||||
return(0);
|
||||
}
|
||||
*volume= (IsoImage *) xorriso->in_volset_handle;
|
||||
xorriso->no_volset_present= 0;
|
||||
return(*volume != NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user