]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/bsr.c
Fix and document new queries
[bacula/bacula] / bacula / src / dird / bsr.c
index f8b75989309318bdbeeaa6fe8c076fc1c8272710..96d30c0ca3dd24f6890a6fb78663fb88ad6c8eec 100644 (file)
@@ -176,6 +176,10 @@ bool complete_bsr(UAContext *ua, RBSR *bsr)
       }
       bsr->VolSessionId = jr.VolSessionId;
       bsr->VolSessionTime = jr.VolSessionTime;
+      if (jr.JobFiles == 0) {      /* zero files is OK, not an error, but */
+         bsr->VolCount = 0;        /*   there are no volumes */
+         continue;
+      }
       if ((bsr->VolCount=db_get_job_volume_parameters(ua->jcr, ua->db, bsr->JobId,
            &(bsr->VolParams))) == 0) {
          ua->error_msg(_("Unable to get Job Volume Parameters. ERR=%s\n"), db_strerror(ua->db));