mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 1884ce2f4c into merged_master (Bitcoin PR bitcoin/bitcoin#22937)
This commit is contained in:
commit
2b8eef42dd
45 changed files with 348 additions and 197 deletions
|
|
@ -70,7 +70,7 @@ static fs::path GetAuthCookieFile(bool temp=false)
|
|||
if (temp) {
|
||||
arg += ".tmp";
|
||||
}
|
||||
return AbsPathForConfigVal(fs::path(arg));
|
||||
return AbsPathForConfigVal(fs::PathFromString(arg));
|
||||
}
|
||||
|
||||
bool GenerateAuthCookie(std::string *cookie_out)
|
||||
|
|
@ -87,7 +87,7 @@ bool GenerateAuthCookie(std::string *cookie_out)
|
|||
fs::path filepath_tmp = GetAuthCookieFile(true);
|
||||
file.open(filepath_tmp);
|
||||
if (!file.is_open()) {
|
||||
LogPrintf("Unable to open cookie authentication file %s for writing\n", filepath_tmp.string());
|
||||
LogPrintf("Unable to open cookie authentication file %s for writing\n", fs::PathToString(filepath_tmp));
|
||||
return false;
|
||||
}
|
||||
file << cookie;
|
||||
|
|
@ -95,10 +95,10 @@ bool GenerateAuthCookie(std::string *cookie_out)
|
|||
|
||||
fs::path filepath = GetAuthCookieFile(false);
|
||||
if (!RenameOver(filepath_tmp, filepath)) {
|
||||
LogPrintf("Unable to rename cookie authentication file %s to %s\n", filepath_tmp.string(), filepath.string());
|
||||
LogPrintf("Unable to rename cookie authentication file %s to %s\n", fs::PathToString(filepath_tmp), fs::PathToString(filepath));
|
||||
return false;
|
||||
}
|
||||
LogPrintf("Generated RPC authentication cookie %s\n", filepath.string());
|
||||
LogPrintf("Generated RPC authentication cookie %s\n", fs::PathToString(filepath));
|
||||
|
||||
if (cookie_out)
|
||||
*cookie_out = cookie;
|
||||
|
|
@ -134,7 +134,7 @@ static fs::path GetMainchainAuthCookieFile()
|
|||
if (gArgs.GetChainName() == "liquidv1") {
|
||||
cookie_file = ".cookie";
|
||||
}
|
||||
return fsbridge::AbsPathJoin(GetMainchainDefaultDataDir(), gArgs.GetArg("-mainchainrpccookiefile", cookie_file));
|
||||
return fsbridge::AbsPathJoin(GetMainchainDefaultDataDir(), fs::PathFromString(gArgs.GetArg("-mainchainrpccookiefile", cookie_file)));
|
||||
}
|
||||
|
||||
bool GetMainchainAuthCookie(std::string *cookie_out)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue