Ignore:
Timestamp:
Jul 24, 2009, 8:53:41 PM (15 years ago)
Author:
Christoph Mayer
Message:

merge from bootstrap branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/configuration/Configuration.cpp

    r3690 r5316  
    5151void Configuration::setConfigFilename(string filename){
    5252        CONFIG_FILE = filename;
    53         instance().reload();
     53        if(haveConfig())
     54                instance().reload();
    5455}
    5556
    5657Configuration::~Configuration(){
    5758        delete config;
     59}
     60
     61bool Configuration::haveConfig(){
     62        std::ifstream in( CONFIG_FILE.c_str() );
     63        if( !in ) return false;
     64
     65        in.close();
     66        return true;
    5867}
    5968
     
    6473
    6574bool Configuration::exists(const string& name){
     75        if(config == NULL) return false;
    6676        return config->keyExists( name );
    6777}
Note: See TracChangeset for help on using the changeset viewer.