diff options
author | Kiminuo <kiminuo@protonmail.com> | 2020-06-11 08:58:46 +0200 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-02-03 18:35:52 +0800 |
commit | 41d7166c8a598b604aad6c6b1d88ad46e23be247 (patch) | |
tree | 883af805ab387dc7db01602a19ccd70d89b78cb1 /src/wallet/load.cpp | |
parent | ffc89d1f21258553c0087b774a9ea1ce84139d4f (diff) |
refactor: replace boost::filesystem with std::filesystem
Warning: Replacing fs::system_complete calls with fs::absolute calls
in this commit may cause minor changes in behaviour because fs::absolute
no longer strips trailing slashes; however these changes are believed to
be safe.
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Diffstat (limited to 'src/wallet/load.cpp')
-rw-r--r-- | src/wallet/load.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/load.cpp b/src/wallet/load.cpp index e6f96074d5..4949ed7dc9 100644 --- a/src/wallet/load.cpp +++ b/src/wallet/load.cpp @@ -19,6 +19,8 @@ #include <univalue.h> +#include <system_error> + namespace wallet { bool VerifyWallets(WalletContext& context) { @@ -27,9 +29,9 @@ bool VerifyWallets(WalletContext& context) if (args.IsArgSet("-walletdir")) { fs::path wallet_dir = fs::PathFromString(args.GetArg("-walletdir", "")); - boost::system::error_code error; + std::error_code error; // 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).remove_trailing_separator(); + fs::path canonical_wallet_dir = fs::canonical(wallet_dir, error); if (error || !fs::exists(wallet_dir)) { chain.initError(strprintf(_("Specified -walletdir \"%s\" does not exist"), fs::PathToString(wallet_dir))); return false; |