HomePhabricator

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

Description

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

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.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Apr 14 2023, 19:22
FabienPushed on Apr 16 2023, 11:20
Reviewer
Restricted Project
Differential Revision
D13725: Work around a bug with std::filesystem::temp_directory_path() with some MinGw
Parents
rABC8e33573475d7: depends: Fix compile error for Qt when using newer GCC 11+
Branches
Unknown
Tags
Unknown