Skip to content

Commit

Permalink
Update configuration.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Mar 22, 2024
1 parent 20de96e commit 964ce6e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/configuration.cpp
Expand Up @@ -438,9 +438,13 @@ void config_save() {
root["pluginData"] = pluginRoot;
for (const auto& opt : unknownOptions) root[opt.first] = opt.second;
std::ofstream out(getBasePath() / "config"/"global.json");
out << root;
out.close();
if (out.is_open()) {
out << root;
out.close();
#ifdef __EMSCRIPTEN__
queueTask([](void*)->void* {syncfs(); return NULL; }, NULL, true);
queueTask([](void*)->void* {syncfs(); return NULL; }, NULL, true);
#endif
} else {
showMessage("An error occurred while writing the global configuration file. The current session's config will not be saved.");
}
}

0 comments on commit 964ce6e

Please sign in to comment.