From: Nicolas Boichat Date: Fri, 29 Jul 2005 13:32:43 +0000 (+0000) Subject: Remove zero-sized parts from spool file when closing DVD-devices. X-Git-Tag: Release-7.0.0~8563 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=654c1e79ce16e6f5a8aaf0f819f8457b2680116b;p=bacula%2Fbacula Remove zero-sized parts from spool file when closing DVD-devices. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2268 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index ff71eecb0d..f0321a15f3 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -473,7 +473,9 @@ void DEVICE::open_dvd_device(DCR *dcr, int omode) file_size = 0; } part_size = 0; - + + Dmsg2(99, "open_dvd_device: num_parts=%d, VolCatInfo.VolCatParts=%d\n", + dcr->dev->num_parts, dcr->VolCatInfo.VolCatParts); if (dcr->dev->num_parts < dcr->VolCatInfo.VolCatParts) { Dmsg2(99, "open_dvd_device: num_parts updated to %d (was %d)\n", dcr->VolCatInfo.VolCatParts, dcr->dev->num_parts); @@ -883,7 +885,7 @@ eod_dev(DEVICE *dev) } /* - * Set the position of the device -- only for files + * Set the position of the device -- only for files and DVD * For other devices, there is no generic way to do it. * Returns: true on succes * false on error @@ -1678,7 +1680,7 @@ static void do_close(DEVICE *dev) } /* Remove the last part file if it is empty */ - if (dev->can_append() && (dev->num_parts > 0)) { + if (dev->num_parts > 0) { struct stat statp; POOL_MEM archive_name(PM_FNAME); dev->part = dev->num_parts;