mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 10:42:23 +02:00
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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user