Work around libstdc++ issue [PR101510] with create_directories where the leaf already exists as a symlink. Fixes #24257, introduced by the switch to std::filesystem
. It is meant to be more thorough than #24266, which worked around one instance of the problem.
The issue was fixed upstream, but unfortunately we’ll have to carry a fix for it for a while.
This introduces a function fs::create_directories
which wraps
std::filesystem::create_directories
. This allows easiliy reverting the
workaround when it is no longer necessary.