Page MenuHomePhabricator

fs: Make compatible with boost 1.78
ClosedPublic

Authored by Fabien on Jan 20 2022, 09:07.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCb9928812c942: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable