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>
This is a partial backport of core#20744 and core#24026
https://github.com/bitcoin/bitcoin/pull/24026/commits/213172c7348091794b173c2edf5f7f3bbe010912
https://github.com/bitcoin/bitcoin/pull/20744/commits/41d7166c8a598b604aad6c6b1d88ad46e23be247
Depends on D12017
Backport notes:
- most differences from the source material are caused by missing wallet backports (migration to sqlite database for descriptor wallets)
- as a result of these missing backports, the core#24026 backport only adds the `fs::copy_file` function, without any of the callsites. This function is used by the commit from core#20744, hence the squashing.