offline_or_rewind_dev(dev);
/* We are going to load a new tape, so close the device */
force_close_dev(dev);
- if (loaded != 0) { /* must unload drive */
+ if (loaded != 0 && loaded != -1) { /* must unload drive */
Dmsg0(400, "Doing changer unload.\n");
Jmsg(jcr, M_INFO, 0,
_("3303 Issuing autochanger \"unload slot %d, drive %d\" command.\n"),
dev->state &= ~ST_LABEL; /* force read of label */
switch (read_dev_volume_label(jcr, dev, block)) {
case VOL_OK:
- bnet_fsend(dir, _("3001 Volume=\"%s\" Slot=%d\n"), dev->VolHdr.VolName, Slot);
+ /* DO NOT add quotes around the Volume name. It is scanned in the DIR */
+ bnet_fsend(dir, _("3001 Volume=%s Slot=%d\n"), dev->VolHdr.VolName, Slot);
Dmsg1(100, "Volume: %s\n", dev->VolHdr.VolName);
break;
default: