diff options
-rw-r--r-- | src/settings.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 775c00699..fa7da806d 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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())) { |