There is no change in behavior. This just helps prepare for the
transition from `boost::filesystem` to `std::filesystem` by avoiding calls
to methods which will be unsafe after the transaction to `std::filesystem`
to due lack of a `boost::filesystem::path::imbue` equivalent and inability
to set a predictable locale.
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Co-authored-by: Kiminuo <kiminuo@protonmail.com>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
This is a backport of core#22937 [2/2]
https://github.com/bitcoin/bitcoin/pull/22937/commits/6544ea5035268025207d2402db2f7d90fde947a6
Depends on D10784, D10781, D10783