MCPcopy Create free account
hub / github.com/ElementsProject/elements / InitSettings

Method InitSettings

src/util/system.cpp:496–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494}
495
496bool ArgsManager::InitSettings(std::string& error)
497{
498 if (!GetSettingsPath()) {
499 return true; // Do nothing if settings file disabled.
500 }
501
502 std::vector<std::string> errors;
503 if (!ReadSettingsFile(&errors)) {
504 error = strprintf("Failed loading settings file:\n%s\n", MakeUnorderedList(errors));
505 return false;
506 }
507 if (!WriteSettingsFile(&errors)) {
508 error = strprintf("Failed saving settings file:\n%s\n", MakeUnorderedList(errors));
509 return false;
510 }
511 return true;
512}
513
514bool ArgsManager::GetSettingsPath(fs::path* filepath, bool temp) const
515{

Callers 1

AppInitFunction · 0.80

Calls 1

MakeUnorderedListFunction · 0.85

Tested by

no test coverage detected