FileRegistry: fix problem with conf file not created.
https://github.com/audetto/AppleWin/issues/30 Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
535ceaadc6
commit
09da101cbb
1 changed files with 8 additions and 2 deletions
|
@ -60,7 +60,6 @@ namespace
|
|||
}
|
||||
else
|
||||
{
|
||||
mySaveOnExit = false;
|
||||
LogFileOutput("Registry: configuration file '%s' not found\n", filename.c_str());
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +68,14 @@ namespace
|
|||
{
|
||||
if (mySaveOnExit)
|
||||
{
|
||||
boost::property_tree::ini_parser::write_ini(myFilename, myINI);
|
||||
try
|
||||
{
|
||||
boost::property_tree::ini_parser::write_ini(myFilename, myINI);
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
LogFileOutput("Registry: cannot save settings to '%s': %s\n", myFilename.c_str(), e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue