diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-01-10 23:48:23 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-01-10 23:48:23 +0200 |
commit | 213172c7348091794b173c2edf5f7f3bbe010912 (patch) | |
tree | d01bfa550958abbb22d7dfe7baa62d5c66dbbf56 /src/wallet/wallet.cpp | |
parent | 3d0850cec103950731bfc0f935ad997a4149d4b3 (diff) |
refactor: Block unsafe std::string fs::path conversion copy_file calls
There is no change in behavior. This just helps prepare for the
transition from boost::filesystem to std::filesystem by avoiding
copy_file calls that will be unsafe after the transition to
std::filesystem to due lack of a boost::filesystem::path::imbue
equivalent and inability to set a predictable locale.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 267710e8c7..3acf4a84c9 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -377,7 +377,7 @@ std::shared_ptr<CWallet> RestoreWallet(WalletContext& context, const std::string } auto wallet_file = wallet_path / "wallet.dat"; - fs::copy_file(backup_file, wallet_file, fs::copy_option::fail_if_exists); + fs::copy_file(fs::u8path(backup_file), wallet_file, fs::copy_option::fail_if_exists); auto wallet = LoadWallet(context, wallet_name, load_on_start, options, status, error, warnings); |