mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 91e07cc50d into merged_master (Bitcoin PR bitcoin/bitcoin#22591)
This commit is contained in:
commit
d37b3948cd
1 changed files with 7 additions and 1 deletions
|
|
@ -60,9 +60,15 @@ bool ReadSettings(const fs::path& path, std::map<std::string, SettingsValue>& va
|
|||
values.clear();
|
||||
errors.clear();
|
||||
|
||||
// Ok for file to not exist
|
||||
if (!fs::exists(path)) return true;
|
||||
|
||||
fsbridge::ifstream file;
|
||||
file.open(path);
|
||||
if (!file.is_open()) return true; // Ok for file not to exist.
|
||||
if (!file.is_open()) {
|
||||
errors.emplace_back(strprintf("%s. Please check permissions.", path.string()));
|
||||
return false;
|
||||
}
|
||||
|
||||
SettingsValue in;
|
||||
if (!in.read(std::string{std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>()})) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue