Skip to content
Snippets Groups Projects
Commit d75f0b03 authored by SmallJoker's avatar SmallJoker Committed by kwolekr
Browse files

Close settings files and save them correctly

parent 4fcf9fb6
No related branches found
No related tags found
No related merge requests found
......@@ -350,8 +350,11 @@ bool Settings::updateConfigFile(const char *filename)
std::ifstream is(filename);
std::ostringstream os(std::ios_base::binary);
if (!updateConfigObject(is, os, ""))
bool was_modified = updateConfigObject(is, os, "");
is.close();
if (!was_modified)
return true;
if (!fs::safeWriteToFile(filename, os.str())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment