From 3603e0707f066228267709fd40d76d8573329869 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 9 Aug 2006 19:25:29 +0000 Subject: Fixed a bug in the config manager base that caused config files to never load or work. --- src/configmanagerbase.cpp | 4 ++-- src/configmanagerbase.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/configmanagerbase.cpp b/src/configmanagerbase.cpp index 4b94cc6..cf7eb3e 100644 --- a/src/configmanagerbase.cpp +++ b/src/configmanagerbase.cpp @@ -17,13 +17,13 @@ void ConfigManagerBase::addSearchPath( const std::string &sPath ) lSearchPath.push_back( sPath ); } -void ConfigManagerBase::loadConfig( const char *lpProfile ) +void ConfigManagerBase::loadConfig( const std::string &sFileName, const char *lpProfile ) { // Try a few locations... std::list::const_iterator i; for( i = lSearchPath.begin(); i != lSearchPath.end(); i++ ) { - if( parseConfig( (*i).c_str(), lpProfile ) ) + if( parseConfig( (*i+sFileName).c_str(), lpProfile ) ) { break; } diff --git a/src/configmanagerbase.h b/src/configmanagerbase.h index b60c73a..11a9a8e 100644 --- a/src/configmanagerbase.h +++ b/src/configmanagerbase.h @@ -12,7 +12,7 @@ public: public: void addSearchPath( const std::string &sPath ); - void loadConfig( const char *lpProfile="default" ); + void loadConfig( const std::string &sFileName, const char *lpProfile="default" ); private: bool parseConfig( const char *lpFileName, const char *lpProfile ); -- cgit v1.2.3