Another bug Eric noticed. I had tests for create_directories() but not create_directory(), and the former was already checking whether it existed or not, so I didn't notice this bug. PR libstdc++/71036 * src/filesystem/ops.cc (create_dir): Handle EEXIST from mkdir. * testsuite/experimental/filesystem/operations/create_directory.cc: New test. Tested x86_64-linux, committed to trunk. Backports to follow.