This might require a bit more adjustments:
0--- a/src/common/settings.cpp
1+++ b/src/common/settings.cpp
2@@ -78,7 +78,7 @@ bool ReadSettings(const fs::path& path, std::map<std::string, SettingsValue>& va
3 if (!fs::exists(path)) return true;
4
5 std::ifstream file;
6- file.open(path);
7+ file.open(path.std_path());
8 if (!file.is_open()) {
9 errors.emplace_back(strprintf("%s. Please check permissions.", fs::PathToString(path)));
10 return false;
11@@ -133,7 +133,7 @@ bool WriteSettings(const fs::path& path,
12 out.pushKVEnd(value.first, value.second);
13 }
14 std::ofstream file;
15- file.open(path);
16+ file.open(path.std_path());
17 if (file.fail()) {
18 errors.emplace_back(strprintf("Error: Unable to open settings file %s for writing", fs::PathToString(path)));
19 return false;
20--- a/src/rpc/request.cpp
21+++ b/src/rpc/request.cpp
22@@ -114,7 +114,7 @@ GenerateAuthCookieResult GenerateAuthCookie(const std::optional<fs::perms>& cook
23 if (filepath_tmp.empty()) {
24 return GenerateAuthCookieResult::DISABLED; // -norpccookiefile
25 }
26- file.open(filepath_tmp);
27+ file.open(filepath_tmp.std_path());
28 if (!file.is_open()) {
29 LogWarning("Unable to open cookie authentication file %s for writing", fs::PathToString(filepath_tmp));
30 return GenerateAuthCookieResult::ERR;
31@@ -153,7 +153,7 @@ bool GetAuthCookie(std::string *cookie_out)
32 if (filepath.empty()) {
33 return true; // -norpccookiefile
34 }
35- file.open(filepath);
36+ file.open(filepath.std_path());
37 if (!file.is_open())
38 return false;
39 std::getline(file, cookie);
40--- a/src/test/settings_tests.cpp
41+++ b/src/test/settings_tests.cpp
42@@ -45,7 +45,7 @@ inline std::ostream& operator<<(std::ostream& os, const std::pair<std::string, c
43 inline void WriteText(const fs::path& path, const std::string& text)
44 {
45 std::ofstream file;
46- file.open(path);
47+ file.open(path.std_path());
48 file << text;
49 }
50
51--- a/src/wallet/dump.cpp
52+++ b/src/wallet/dump.cpp
53@@ -37,7 +37,7 @@ bool DumpWallet(const ArgsManager& args, WalletDatabase& db, bilingual_str& erro
54 return false;
55 }
56 std::ofstream dump_file;
57- dump_file.open(path);
58+ dump_file.open(path.std_path());
59 if (dump_file.fail()) {
60 error = strprintf(_("Unable to open %s for writing"), fs::PathToString(path));
61 return false;