]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/label.c
Fix bug #1208
[bacula/bacula] / bacula / src / stored / label.c
index 881bf9509679b0a0d246539e464ecca78f6bd2a2..b4274059bd90d069ffa8615cd8d4f6487f95e25e 100644 (file)
@@ -414,7 +414,8 @@ bail_out:
 
 /*
  * Write a volume label. This is ONLY called if we have a valid Bacula
- *   label of type PRE_LABEL;
+ *   label of type PRE_LABEL or we are recyling an existing Volume.
+ *
  *  Returns: true if OK
  *           false if unable to write it
  */
@@ -501,6 +502,7 @@ bool rewrite_volume_label(DCR *dcr, bool recycle)
    if (recycle) {
       dev->VolCatInfo.VolCatMounts++;
       dev->VolCatInfo.VolCatRecycles++;
+      dir_create_jobmedia_record(dcr, true);
    } else {
       dev->VolCatInfo.VolCatMounts = 1;
       dev->VolCatInfo.VolCatRecycles = 0;