From 59a984e1fa87646b667300e4740b51125af2bf6a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 22 Dec 2006 09:22:02 +0000 Subject: [PATCH] Apply scanvolume patch from Richard Mortimer that fixes bug #738 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3841 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/scan.c | 9 +++++---- bacula/technotes-1.39 | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bacula/src/stored/scan.c b/bacula/src/stored/scan.c index 809da6b297..137cc91670 100644 --- a/bacula/src/stored/scan.c +++ b/bacula/src/stored/scan.c @@ -56,8 +56,10 @@ bool DEVICE::scan_dir_for_volume(DCR *dcr) bool need_slash = false; int len; - + dcrVolCatInfo = dcr->VolCatInfo; /* structure assignment */ + devVolCatInfo = VolCatInfo; /* structure assignment */ bstrncpy(VolumeName, dcr->VolumeName, sizeof(VolumeName)); + name_max = pathconf(".", _PC_NAME_MAX); if (name_max < 1024) { name_max = 1024; @@ -113,9 +115,6 @@ bool DEVICE::scan_dir_for_volume(DCR *dcr) * this volume is really OK. If not, put back the desired * volume name, mark it not in changer and continue. */ - dcrVolCatInfo = dcr->VolCatInfo; /* structure assignment */ - devVolCatInfo = VolCatInfo; /* structure assignment */ - bstrncpy(VolumeName, dcr->VolumeName, sizeof(VolumeName)); /* Check if this is a valid Volume in the pool */ bstrncpy(dcr->VolumeName, result->d_name, sizeof(dcr->VolumeName)); if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_WRITE)) { @@ -135,6 +134,8 @@ get_out: if (!found) { /* Restore VolumeName we really wanted */ bstrncpy(dcr->VolumeName, VolumeName, sizeof(dcr->VolumeName)); + dcr->VolCatInfo = dcrVolCatInfo; /* structure assignment */ + VolCatInfo = devVolCatInfo; /* structure assignment */ } sm_check(__FILE__, __LINE__, false); return found; diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 835057dfd8..338177cd14 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,6 +1,10 @@ Technical notes on version 1.39 General: +22Dec06 +kes Apply scanvolume patch from Richard Mortimer that fixes bug + #738. + Version 1.39.32 released: 20Dec06 kes Take first catalog if gui is set, or if using dotcmd. -- 2.39.5