if (part <= num_dvd_parts) {
omode = OPEN_READ_ONLY;
make_mounted_dvd_filename(this, archive_name);
+ set_part_spooled(false);
} else {
omode = OPEN_READ_WRITE;
make_spooled_dvd_filename(this, archive_name);
+ set_part_spooled(true);
}
set_mode(omode);
/* Remove the last part file if it is empty */
if (num_dvd_parts > 0) {
struct stat statp;
- int part_save = part;
+ uint32_t part_save = part;
POOL_MEM archive_name(PM_FNAME);
int status;
part, num_dvd_parts, VolCatInfo.VolCatName);
Dmsg1(100, "unlink(%s)\n", archive_name.c_str());
unlink(archive_name.c_str());
- set_part_spooled(false); /* no spooled part left */
+ if (part_save == part) {
+ set_part_spooled(false); /* no spooled part left */
+ }
} else if (status < 0) {
- set_part_spooled(false); /* spool doesn't exit */
+ if (part_save == part) {
+ set_part_spooled(false); /* spool doesn't exit */
+ }
}
part = part_save; /* restore part number */
}
{
pm_strcpy(archive_name, dev->device->mount_point);
add_file_and_part_name(dev, archive_name);
- dev->set_part_spooled(false);
}
void make_spooled_dvd_filename(DEVICE *dev, POOL_MEM &archive_name)
pm_strcpy(archive_name, working_directory);
}
add_file_and_part_name(dev, archive_name);
- dev->set_part_spooled(true);
}
static void add_file_and_part_name(DEVICE *dev, POOL_MEM &archive_name)
bsnprintf(partnumber, sizeof(partnumber), "%d", dev->part);
pm_strcat(archive_name, partnumber);
}
- Dmsg1(400, "Exit add_file_part_name: arch=%s\n", archive_name.c_str());
+ Dmsg2(400, "Exit add_file_part_name: arch=%s, part=%d\n",
+ archive_name.c_str(), dev->part);
}
/* Mount the device.
/* Delete spool file */
make_spooled_dvd_filename(dev, archive_name);
unlink(archive_name.c_str());
+ dev->set_part_spooled(false);
Dmsg1(29, "unlink(%s)\n", archive_name.c_str());
sm_check(__FILE__, __LINE__, false);
return true;
/* Delete spool file */
make_spooled_dvd_filename(dev, archive_name);
unlink(archive_name.c_str());
+ dev->set_part_spooled(false);
Dmsg1(29, "unlink(%s)\n", archive_name.c_str());
sm_check(__FILE__, __LINE__, false);
Dmsg1(100, "Check if part on DVD: %s\n", archive_name.c_str());
if (stat(archive_name.c_str(), &buf) == 0) {
/* bad news bail out */
+ dev->set_part_spooled(false);
Mmsg1(&dev->errmsg, _("Next Volume part already exists on DVD. Cannot continue: %s\n"),
archive_name.c_str());
return -1;
/* Then try to unlink it */
if (unlink(archive_name.c_str()) < 0) {
berrno be;
+ dev->set_part_spooled(false);
dev->dev_errno = errno;
Mmsg2(dev->errmsg, _("open_next_part can't unlink existing part %s, ERR=%s\n"),
archive_name.c_str(), be.strerror());
nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$R1" /G SYSTEM:F Administrators:F'
${EndIf}
+ CreateShortCut "$SMPROGRAMS\Bacula\bconsole.lnk" "$INSTDIR\bin\bconsole.exe" '-c "$APPDATA\Bacula\bconsole.conf"' "$INSTDIR\bin\bconsole.exe" 0
CreateShortCut "$SMPROGRAMS\Bacula\Edit Command Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\bconsole.conf"'
SectionEnd
${EndIf}
; Create Start Menu entry
- CreateShortCut "$SMPROGRAMS\Bacula\Console.lnk" "$INSTDIR\bin\wx-console.exe" '-c "$APPDATA\Bacula\wx-console.conf"' "$INSTDIR\bin\wx-console.exe" 0
+ CreateShortCut "$SMPROGRAMS\Bacula\wx-console.lnk" "$INSTDIR\bin\wx-console.exe" '-c "$APPDATA\Bacula\wx-console.conf"' "$INSTDIR\bin\wx-console.exe" 0
CreateShortCut "$SMPROGRAMS\Bacula\Edit Graphical Console Configuration.lnk" "write.exe" '"$APPDATA\Bacula\wx-console.conf"'
SectionEnd