From c5ede7e4f1ef52628afceb6ad3c298e05f0aca76 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 23 Jul 2005 09:45:26 +0000 Subject: [PATCH] Fix additional problems with VSS backup that I introduced. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2237 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kes-1.37 | 3 +++ bacula/src/version.h | 2 +- bacula/src/win32/compat/vss.cpp | 11 ++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bacula/kes-1.37 b/bacula/kes-1.37 index 4835db30b1..690a3262e7 100644 --- a/bacula/kes-1.37 +++ b/bacula/kes-1.37 @@ -3,6 +3,9 @@ General: +Changes to 1.37.32: +23Jul05 +- Fix additional problems with VSS backup that I introduced. Changes to 1.37.31: 22Jul05 - Correct compiler complaints in wx-console and tray-monitor. diff --git a/bacula/src/version.h b/bacula/src/version.h index 33196a4bd5..cc7c654a44 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,6 +1,6 @@ /* */ #undef VERSION -#define VERSION "1.37.31" +#define VERSION "1.37.32" #define BDATE "22 July 2005" #define LSMDATE "22Jul05" diff --git a/bacula/src/win32/compat/vss.cpp b/bacula/src/win32/compat/vss.cpp index e59e5e5ea2..5fc878adf7 100644 --- a/bacula/src/win32/compat/vss.cpp +++ b/bacula/src/win32/compat/vss.cpp @@ -1,4 +1,4 @@ -// -*- Mode: C++ -*- + // vss.cpp -- Interface to Volume Shadow Copies (VSS) // // Copyright transferred from MATRIX-Computer GmbH to @@ -113,18 +113,19 @@ BOOL VSSClient::InitializeForBackup() -BOOL VSSClient::GetShadowPath (const char *szFilePath, char *szShadowPath, int nBuflen) +BOOL VSSClient::GetShadowPath(const char *szFilePath, char *szShadowPath, int nBuflen) { if (!m_bBackupIsInitialized) return FALSE; - /* check for valid pathname -- note, allow simple drive letter too */ + /* check for valid pathname */ BOOL bIsValidName; - bIsValidName = strlen(szFilePath) >= 2; + bIsValidName = strlen(szFilePath) > 3; if (bIsValidName) bIsValidName &= isalpha (szFilePath[0]) && - szFilePath[1]==':'; + szFilePath[1]==':' && + szFilePath[2] == '\\'; if (bIsValidName) { int nDriveIndex = toupper(szFilePath[0])-'A'; -- 2.39.5