diff options
Diffstat (limited to 'src/filesystem/inifile.cc')
-rw-r--r-- | src/filesystem/inifile.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/filesystem/inifile.cc b/src/filesystem/inifile.cc index d9f2839..337cf45 100644 --- a/src/filesystem/inifile.cc +++ b/src/filesystem/inifile.cc @@ -16,7 +16,7 @@ IniFile::IniFile() {} IniFile::~IniFile() {} -void IniFile::open(std::string const & name) { +bool IniFile::open(std::string const & name) { last_read_was_section = false; last_read_was_key = false; @@ -32,7 +32,7 @@ void IniFile::open(std::string const & name) { filesystem::File *f = filesystem::open(inifile_name.c_str()); if (!f) { con_warn << "Could not open " << inifile_name << std::endl; - return; + return false; } std::string fn = f->path(); @@ -42,8 +42,10 @@ void IniFile::open(std::string const & name) { inifile_ifs.open(fn.c_str()); if (!inifile_ifs.is_open()) { con_warn << "Could not stream " << fn << "!\n"; - return; + return false; } + + return true; } |