]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/block.c
- Simplify code in askdir.c that waits for creating an appendable
[bacula/bacula] / bacula / src / stored / block.c
index 293a782f826b0ede24221057c74f6fe48f50850e..5f3f2feb0442342f7ef6136d956b013efe2bd4bd 100644 (file)
@@ -696,6 +696,7 @@ static bool terminate_writing_volume(DCR *dcr)
    
    if (dev->is_dvd()) {
       dvd_write_part(dcr);                 /* write last part */
+      dev->VolCatInfo.VolCatParts = dev->num_parts;
    }
    
    if (!dir_update_volume_info(dcr, false)) {
@@ -782,11 +783,14 @@ static bool do_dvd_size_checks(DCR *dcr)
    JCR *jcr = dcr->jcr;
    DEV_BLOCK *block = dcr->block;
 
+   /* Don't go further if the device is not a dvd */
+   if (!dev->is_dvd()) {
+      return true;
+   }
+   
    /* Limit maximum part size to value specified by user 
-    * (not applicable to tapes/fifos)   
     */
-   if (!(dev->is_tape() || dev->is_fifo()) && dev->max_part_size > 0 &&
-        (dev->part_size + block->binbuf) >= dev->max_part_size) {
+   if (dev->max_part_size > 0 && ((dev->part_size + block->binbuf) >= dev->max_part_size)) {
       if (dev->part < dev->num_parts) {
          Jmsg3(dcr->jcr, M_FATAL, 0, _("Error while writing, current part number"
                " is less than the total number of parts (%d/%d, device=%s)\n"),