fs: use path::is_absolute() instead of path::is_complete()

path::is_complete() has been deprecated since boost::filesystem
version 3, which was introduced with boost 1.44.0, and removed in
1.85.0. The minimum supported boost version has been 1.60.0 since
Dogecoin Core release v1.14.3, so this can be safely replaced.
This commit is contained in:
Patrick Lodder 2024-06-12 05:21:53 -04:00
parent fdf534c133
commit 1d84f4f853
No known key found for this signature in database
GPG Key ID: 7C523F5FBABE80E7
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ static const std::string COOKIEAUTH_FILE = ".cookie";
fs::path GetAuthCookieFile()
{
fs::path path(GetArg("-rpccookiefile", COOKIEAUTH_FILE));
if (!path.is_complete()) path = GetDataDir() / path;
if (!path.is_absolute()) path = GetDataDir() / path;
return path;
}

View File

@ -588,7 +588,7 @@ const fs::path &GetBackupDir()
fs::path GetConfigFile(const std::string& confPath)
{
fs::path pathConfigFile(confPath);
if (!pathConfigFile.is_complete())
if (!pathConfigFile.is_absolute())
pathConfigFile = GetDataDir(false) / pathConfigFile;
return pathConfigFile;
@ -624,7 +624,7 @@ void ReadConfigFile(const std::string& confPath)
fs::path GetPidFile()
{
fs::path pathPidFile(GetArg("-pid", BITCOIN_PID_FILENAME));
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
if (!pathPidFile.is_absolute()) pathPidFile = GetDataDir() / pathPidFile;
return pathPidFile;
}