Skip to content

Commit 6cfd452

Browse files
authored
Merge pull request dogecoin#3558 from patricklodder/compat/boost185
compat: fix compatibility with boost 1.85
2 parents f78c49a + d021d75 commit 6cfd452

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

src/rpc/protocol.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static const std::string COOKIEAUTH_FILE = ".cookie";
7373
fs::path GetAuthCookieFile()
7474
{
7575
fs::path path(GetArg("-rpccookiefile", COOKIEAUTH_FILE));
76-
if (!path.is_complete()) path = GetDataDir() / path;
76+
if (!path.is_absolute()) path = GetDataDir() / path;
7777
return path;
7878
}
7979

src/util.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ const fs::path &GetBackupDir()
588588
fs::path GetConfigFile(const std::string& confPath)
589589
{
590590
fs::path pathConfigFile(confPath);
591-
if (!pathConfigFile.is_complete())
591+
if (!pathConfigFile.is_absolute())
592592
pathConfigFile = GetDataDir(false) / pathConfigFile;
593593

594594
return pathConfigFile;
@@ -624,7 +624,7 @@ void ReadConfigFile(const std::string& confPath)
624624
fs::path GetPidFile()
625625
{
626626
fs::path pathPidFile(GetArg("-pid", BITCOIN_PID_FILENAME));
627-
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
627+
if (!pathPidFile.is_absolute()) pathPidFile = GetDataDir() / pathPidFile;
628628
return pathPidFile;
629629
}
630630

src/validation.h

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include <algorithm>
2525
#include <exception>
26+
#include <list>
2627
#include <map>
2728
#include <set>
2829
#include <stdint.h>

src/wallet/wallet.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,10 @@ bool CWallet::Verify()
459459
uiInterface.InitMessage(_("Verifying wallet..."));
460460

461461
// Wallet file must be a plain filename without a directory
462-
if (walletFile != fs::basename(walletFile) + fs::extension(walletFile))
462+
fs::path walletPath(walletFile);
463+
if (walletFile != walletPath.stem().string() + walletPath.extension().string()) {
463464
return InitError(strprintf(_("Wallet %s resides outside data directory %s"), walletFile, GetDataDir().string()));
465+
}
464466

465467
if (!bitdb.Open(GetDataDir()))
466468
{
@@ -4019,7 +4021,11 @@ bool CWallet::BackupWallet(const std::string& strDest)
40194021
return false;
40204022
}
40214023

4022-
#if BOOST_VERSION >= 104000
4024+
#if BOOST_VERSION >= 107400
4025+
// Boost 1.74.0 and up implements std++17 like "copy_options", and this
4026+
// is the only remaining enum after 1.85.0
4027+
fs::copy_file(pathSrc, pathDest, fs::copy_options::overwrite_existing);
4028+
#elif BOOST_VERSION >= 104000
40234029
fs::copy_file(pathSrc, pathDest, fs::copy_option::overwrite_if_exists);
40244030
#else
40254031
fs::copy_file(pathSrc, pathDest);

0 commit comments

Comments
 (0)