diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-08-09 19:25:29 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-08-09 19:25:29 +0000 |
commit | 3603e0707f066228267709fd40d76d8573329869 (patch) | |
tree | 215084e6ce579c34e79cbf0097bb75584dc49a4e /src | |
parent | 4f91790abe1b77f1a27ca46edd8143ef2d2b9fde (diff) | |
download | libbu++-3603e0707f066228267709fd40d76d8573329869.tar.gz libbu++-3603e0707f066228267709fd40d76d8573329869.tar.bz2 libbu++-3603e0707f066228267709fd40d76d8573329869.tar.xz libbu++-3603e0707f066228267709fd40d76d8573329869.zip |
Fixed a bug in the config manager base that caused config files to never load
or work.
Diffstat (limited to 'src')
-rw-r--r-- | src/configmanagerbase.cpp | 4 | ||||
-rw-r--r-- | 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 ) | |||
17 | lSearchPath.push_back( sPath ); | 17 | lSearchPath.push_back( sPath ); |
18 | } | 18 | } |
19 | 19 | ||
20 | void ConfigManagerBase::loadConfig( const char *lpProfile ) | 20 | void ConfigManagerBase::loadConfig( const std::string &sFileName, const char *lpProfile ) |
21 | { | 21 | { |
22 | // Try a few locations... | 22 | // Try a few locations... |
23 | std::list<std::string>::const_iterator i; | 23 | std::list<std::string>::const_iterator i; |
24 | for( i = lSearchPath.begin(); i != lSearchPath.end(); i++ ) | 24 | for( i = lSearchPath.begin(); i != lSearchPath.end(); i++ ) |
25 | { | 25 | { |
26 | if( parseConfig( (*i).c_str(), lpProfile ) ) | 26 | if( parseConfig( (*i+sFileName).c_str(), lpProfile ) ) |
27 | { | 27 | { |
28 | break; | 28 | break; |
29 | } | 29 | } |
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: | |||
12 | 12 | ||
13 | public: | 13 | public: |
14 | void addSearchPath( const std::string &sPath ); | 14 | void addSearchPath( const std::string &sPath ); |
15 | void loadConfig( const char *lpProfile="default" ); | 15 | void loadConfig( const std::string &sFileName, const char *lpProfile="default" ); |
16 | 16 | ||
17 | private: | 17 | private: |
18 | bool parseConfig( const char *lpFileName, const char *lpProfile ); | 18 | bool parseConfig( const char *lpFileName, const char *lpProfile ); |