Bug fix, read errors are now handled propertly.
This commit is contained in:
parent
444689d163
commit
e57b51a160
@ -302,6 +302,10 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
|||||||
for (b = 0; b < nblocks; ++b) {
|
for (b = 0; b < nblocks; ++b) {
|
||||||
int wres;
|
int wres;
|
||||||
res = filesrc_read(file, buffer, BLOCK_SIZE);
|
res = filesrc_read(file, buffer, BLOCK_SIZE);
|
||||||
|
if (res <= 0) {
|
||||||
|
/* read error */
|
||||||
|
break;
|
||||||
|
}
|
||||||
wres = iso_write(t, buffer, BLOCK_SIZE);
|
wres = iso_write(t, buffer, BLOCK_SIZE);
|
||||||
if (wres < 0) {
|
if (wres < 0) {
|
||||||
/* ko, writer error, we need to go out! */
|
/* ko, writer error, we need to go out! */
|
||||||
|
Loading…
Reference in New Issue
Block a user