Page MenuHomePhabricator

Work around a bug with std::filesystem::temp_directory_path() with some MinGw
ClosedPublic

Authored by Fabien on Apr 14 2023, 21:16.

Details

Summary

The Bullseye MinGw version (posix variant) of std::filesystem returns an empty path from temp_directory_path(). This is not a problem for now because we use the boost filesystem variant, but it is in the way of migrating ot std::filesystem.
This diffs creates a new fsbridge function to get a temporary directory path that doesn't use temp_directory_path() for windows, preventing the bug.
Note that this function is only used during the execution of the unit tests.

Test Plan
ninja check

Run the windows cross build tests.

Diff Detail

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