Changes about blanking loaded image
This commit is contained in:
parent
38cd3622b5
commit
61e3a66349
@ -128,21 +128,19 @@ int isoburn_read_image(struct burn_drive *d,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
|
/* New empty image without relation to a drive */
|
||||||
if (image==NULL)
|
if (image==NULL)
|
||||||
return -1;
|
return -1;
|
||||||
/* create a new image */
|
/* create a new image */
|
||||||
ret = iso_image_new("NEW DISC", image);
|
ret = iso_image_new("ISOIMAGE", image);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
/* use isoburn image */
|
/* Blank new image for the drive */
|
||||||
if (status == BURN_DISC_BLANK || read_opts->pretend_blank) {
|
iso_image_unref(o->image);
|
||||||
/* we need to blanck old image */
|
ret = iso_image_new("ISOIMAGE", &o->image);
|
||||||
iso_image_unref(o->image);
|
if (ret < 0)
|
||||||
ret = iso_image_new("NEW DISC", &o->image);
|
return ret;
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
if (image) {
|
if (image) {
|
||||||
*image = o->image;
|
*image = o->image;
|
||||||
iso_image_ref(*image); /*protects object from premature free*/
|
iso_image_ref(*image); /*protects object from premature free*/
|
||||||
|
Loading…
Reference in New Issue
Block a user