From 1d84f4f853c4dd8e9e5267d0fce0706d33422e36 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Wed, 12 Jun 2024 05:21:53 -0400 Subject: [PATCH] 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. --- src/rpc/protocol.cpp | 2 +- src/util.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp index 53001e959..527510b93 100644 --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -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; } diff --git a/src/util.cpp b/src/util.cpp index 0f7a4db7a..0aa22af85 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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; }