-
- /* If the device is nor a dvd and WritePartAfterJob
- * is set to yes, open the next part, so, in case of a device
- * that requires mount, it will be written to the device.
- */
- if (ok && dev->is_dvd() && jcr->write_part_after_job && (dev->part_size > 0)) {
- Dmsg0(100, "Writing last part because write_part_after_job is set.\n");
- if (dev->part < dev->num_parts) {
- Jmsg3(jcr, M_FATAL, 0, _("Error while writing, current part number is less than the total number of parts (%d/%d, device=%s)\n"),
- dev->part, dev->num_parts, dev->print_name());
- dev->dev_errno = EIO;
- ok = false;
- }
-
- if (ok && (open_next_part(dev) < 0)) {
- Jmsg2(jcr, M_FATAL, 0, _("Unable to open device next part %s: ERR=%s\n"),
- dev->print_name(), strerror_dev(dev));
- dev->dev_errno = EIO;
- ok = false;
- }
-
- dev->VolCatInfo.VolCatParts = dev->num_parts;
- }