Skip to content

Commit 98206ba

Browse files
authored
Fix saving of settings.ini (#260)
1 parent f355a3e commit 98206ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SofaImGui/src/SofaImGui/AppIniFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace sofaimgui
3535
{
3636
static const std::string configPath(
3737
helper::system::FileSystem::append(sofa::gui::common::BaseGUI::getConfigDirectoryPath(), "imgui"));
38-
helper::system::FileSystem::ensureFolderExists("imgui");
38+
helper::system::FileSystem::ensureFolderExists(configPath);
3939
return configPath;
4040
}
4141

SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void ImGuiGUIEngine::init()
139139
SI_Error rc = ini.SaveFile(sofaimgui::AppIniFile::getAppIniFile().c_str());
140140
if (rc != SI_OK)
141141
{
142-
msg_error("ImGuiGUIEngine") << std::strerror(errno) << "'" << sofaimgui::AppIniFile::getAppIniFile() << "'";
142+
msg_error("ImGuiGUIEngine") << "Saving file '" << sofaimgui::AppIniFile::getAppIniFile() << "' failed. " << std::strerror(errno) << ". Error code " << rc;
143143
}
144144
assert(rc == SI_OK);
145145
pv = sofaimgui::defaultStyle.c_str();

0 commit comments

Comments
 (0)