Page MenuHomePhabricator

refactor: Block unsafe std::string fs::path conversion copy_file calls
AbandonedPublicDraft

Authored by PiRK on Nov 24 2022, 14:07.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

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 is a partial backport of core#24026
https://github.com/bitcoin/bitcoin/pull/24026/commits/213172c7348091794b173c2edf5f7f3bbe010912

Note: the rest of the PR is not applicable due to missing wallet backports

Test Plan

ninja all check-all