merge bitcoin#24104: Make compatible with boost 1.78

This commit is contained in:
Kittywhiskers Van Gogh 2024-07-20 11:40:53 +00:00
parent 7c270e6883
commit 7ffea4348f
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD
3 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ static inline auto quoted(const std::string& s)
// Allow safe path append operations. // Allow safe path append operations.
static inline path operator+(path p1, path p2) static inline path operator+(path p1, path p2)
{ {
p1 += std::move(p2); p1 += static_cast<boost::filesystem::path&&>(p2);
return p1; return p1;
} }

View File

@ -25,7 +25,7 @@ bool VerifyWallets(interfaces::Chain& chain)
fs::path wallet_dir = fs::PathFromString(gArgs.GetArg("-walletdir", "")); fs::path wallet_dir = fs::PathFromString(gArgs.GetArg("-walletdir", ""));
boost::system::error_code error; boost::system::error_code error;
// The canonical path cleans the path, preventing >1 Berkeley environment instances for the same directory // The canonical path cleans the path, preventing >1 Berkeley environment instances for the same directory
fs::path canonical_wallet_dir = fs::canonical(wallet_dir, error); fs::path canonical_wallet_dir = fs::canonical(wallet_dir, error).remove_trailing_separator();
if (error || !fs::exists(wallet_dir)) { if (error || !fs::exists(wallet_dir)) {
chain.initError(strprintf(_("Specified -walletdir \"%s\" does not exist"), fs::PathToString(wallet_dir))); chain.initError(strprintf(_("Specified -walletdir \"%s\" does not exist"), fs::PathToString(wallet_dir)));
return false; return false;

View File

@ -141,7 +141,7 @@ class MultiWalletTest(BitcoinTestFramework):
# should raise rpc error if wallet path can't be created # should raise rpc error if wallet path can't be created
err_code = -4 if self.options.descriptors else -1 err_code = -4 if self.options.descriptors else -1
assert_raises_rpc_error(err_code, "boost::filesystem::create_directory:", self.nodes[0].createwallet, "w8/bad") assert_raises_rpc_error(err_code, "boost::filesystem::create_director", self.nodes[0].createwallet, "w8/bad")
# check that all requested wallets were created # check that all requested wallets were created
self.stop_node(0) self.stop_node(0)