| 436 | } |
| 437 | |
| 438 | bool ArgsManager::GetSettingsPath(fs::path* filepath, bool temp, bool backup) const |
| 439 | { |
| 440 | fs::path settings = GetPathArg("-settings", BITCOIN_SETTINGS_FILENAME); |
| 441 | if (settings.empty()) { |
| 442 | return false; |
| 443 | } |
| 444 | if (backup) { |
| 445 | settings += ".bak"; |
| 446 | } |
| 447 | if (filepath) { |
| 448 | *filepath = fsbridge::AbsPathJoin(GetDataDirNet(), temp ? settings + ".tmp" : settings); |
| 449 | } |
| 450 | return true; |
| 451 | } |
| 452 | |
| 453 | static void SaveErrors(const std::vector<std::string> errors, std::vector<std::string>* error_out) |
| 454 | { |
no test coverage detected