HomePhabricator

fs: Make compatible with boost 1.78

Description

fs: Make compatible with boost 1.78

Summary:

Boost 1.78 removed operator+ in a way that breaks our usage of it in a subclass. A proposed workaround for this is to cast the argument to boost::filesystem::path, and this is backwards compatible with older versions of boost.

Additionally, it appears that fs::canonical no longer removes trailing slashes. This was causing a test to fail. The solution is to explicitly remove the trailing separator in the one place that fs::canonical is used.

Lastly, fs::create_directories now has an error message saying create_directories instead of create_directory. This caused wallet_multiwallet.py to fail. The error message check has been updated to be able accept either string.

Backport of core#24104.

This replaces the build failure work around introduced in D10822.

Test Plan:
With boost 1.78:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D10850

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Jan 19 2022, 20:21
FabienCommitted on Jan 20 2022, 10:03
FabienPushed on Jan 20 2022, 10:03
Reviewer
Restricted Project
Differential Revision
D10850: fs: Make compatible with boost 1.78
Parents
rABCcfda33cc8a29: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown