mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
util, refactor: Use GetPathArg to read "-rpccookiefile" value
This commit is contained in:
parent
1276090705
commit
138c668e2b
1 changed files with 3 additions and 3 deletions
|
@ -66,16 +66,16 @@ UniValue JSONRPCError(int code, const std::string& message)
|
|||
*/
|
||||
static const std::string COOKIEAUTH_USER = "__cookie__";
|
||||
/** Default name for auth cookie file */
|
||||
static const std::string COOKIEAUTH_FILE = ".cookie";
|
||||
static const char* const COOKIEAUTH_FILE = ".cookie";
|
||||
|
||||
/** Get name of RPC authentication cookie file */
|
||||
static fs::path GetAuthCookieFile(bool temp=false)
|
||||
{
|
||||
std::string arg = gArgs.GetArg("-rpccookiefile", COOKIEAUTH_FILE);
|
||||
fs::path arg = gArgs.GetPathArg("-rpccookiefile", COOKIEAUTH_FILE);
|
||||
if (temp) {
|
||||
arg += ".tmp";
|
||||
}
|
||||
return AbsPathForConfigVal(fs::PathFromString(arg));
|
||||
return AbsPathForConfigVal(arg);
|
||||
}
|
||||
|
||||
bool GenerateAuthCookie(std::string *cookie_out)
|
||||
|
|
Loading…
Add table
Reference in a new issue