[Box Backup-commit] COMMIT r1691 - box/chris/general/bin/bbstored

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat May 26 16:33:58 BST 2007


Author: chris
Date: 2007-05-26 16:33:57 +0100 (Sat, 26 May 2007)
New Revision: 1691

Modified:
   box/chris/general/bin/bbstored/BackupStoreDaemon.cpp
Log:
Determine RaidFile path at runtime if not supplied in config file
on Windows.


Modified: box/chris/general/bin/bbstored/BackupStoreDaemon.cpp
===================================================================
--- box/chris/general/bin/bbstored/BackupStoreDaemon.cpp	2007-05-26 15:33:26 UTC (rev 1690)
+++ box/chris/general/bin/bbstored/BackupStoreDaemon.cpp	2007-05-26 15:33:57 UTC (rev 1691)
@@ -132,7 +132,23 @@
 	
 	// Initialise the raid files controller
 	RaidFileController &rcontroller = RaidFileController::GetController();
-	rcontroller.Initialise(config.GetKeyValue("RaidFileConf").c_str());
+
+	std::string raidFileConfig;
+
+	#ifdef WIN32
+		if (!config.KeyExists("RaidFileConf"))
+		{
+			raidFileConfig = BOX_GET_DEFAULT_RAIDFILE_CONFIG_FILE;
+		}
+		else
+		{
+			raidFileConfig = config.GetKeyValue("RaidFileConf");
+		}
+	#else
+		raidFileConfig = config.GetKeyValue("RaidFileConf");
+	#endif
+
+	rcontroller.Initialise(raidFileConfig);
 	
 	// Load the account database
 	std::auto_ptr<BackupStoreAccountDatabase> pdb(BackupStoreAccountDatabase::Read(config.GetKeyValue("AccountDatabase").c_str()));




More information about the Boxbackup-commit mailing list