From 36996b60ac2f41ab70832db6bd02469d9a617fec Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 2 Feb 2012 22:20:29 +0000 Subject: Force all options to be present to BackupClientRestore(), to fix misinterpretation of char * arguments as bools. Use macros to simplify test code. Test that locations not present when bbackupd started will be detected and backed up if subsequently created. --- lib/backupclient/BackupClientRestore.cpp | 4 ++-- lib/backupclient/BackupClientRestore.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/backupclient') diff --git a/lib/backupclient/BackupClientRestore.cpp b/lib/backupclient/BackupClientRestore.cpp index 43ad73f3..db72c4bd 100644 --- a/lib/backupclient/BackupClientRestore.cpp +++ b/lib/backupclient/BackupClientRestore.cpp @@ -841,8 +841,8 @@ static int BackupClientRestoreDir(BackupProtocolClient &rConnection, // // -------------------------------------------------------------------------- int BackupClientRestore(BackupProtocolClient &rConnection, - int64_t DirectoryID, const char *RemoteDirectoryName, - const char *LocalDirectoryName, bool PrintDots, bool RestoreDeleted, + int64_t DirectoryID, const std::string& RemoteDirectoryName, + const std::string& LocalDirectoryName, bool PrintDots, bool RestoreDeleted, bool UndeleteAfterRestoreDeleted, bool Resume, bool ContinueAfterErrors) { diff --git a/lib/backupclient/BackupClientRestore.h b/lib/backupclient/BackupClientRestore.h index 311a15bd..77f09c2e 100644 --- a/lib/backupclient/BackupClientRestore.h +++ b/lib/backupclient/BackupClientRestore.h @@ -24,13 +24,13 @@ enum int BackupClientRestore(BackupProtocolClient &rConnection, int64_t DirectoryID, - const char *RemoteDirectoryName, - const char *LocalDirectoryName, - bool PrintDots = false, - bool RestoreDeleted = false, - bool UndeleteAfterRestoreDeleted = false, - bool Resume = false, - bool ContinueAfterErrors = false); + const std::string& RemoteDirectoryName, + const std::string& LocalDirectoryName, + bool PrintDots, + bool RestoreDeleted, + bool UndeleteAfterRestoreDeleted, + bool Resume, + bool ContinueAfterErrors); #endif // BACKUPSCLIENTRESTORE__H -- cgit v1.2.3