- return error on _load() when no config file exists

This commit is contained in:
gimmedonutnow 2006-08-17 03:55:06 +00:00
parent ea9b2a33a1
commit c985215391
1 changed files with 4 additions and 0 deletions

View File

@ -371,6 +371,10 @@ Config::_load()
try {
// open the file for reading (create if it doesn't exist)
config.open(configFile.c_str(), std::ios::in | std::ios::out);
if(!config.is_open()) {
// XXX file couldn't be opened?
return -1;
}
while(!config.eof()) {
// read a line