diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h --- a/libcxx/test/support/filesystem_test_helper.h +++ b/libcxx/test/support/filesystem_test_helper.h @@ -299,11 +299,11 @@ static inline fs::path available_cwd_path() { fs::path const cwd = utils::getcwd(); fs::path const tmp = fs::temp_directory_path(); - fs::path const base = tmp / cwd.filename(); + std::string base = cwd.filename().string(); int i = 0; - fs::path p = base / ("static_env." + std::to_string(i)); + fs::path p = tmp / (base + "-static_env." + std::to_string(i)); while (utils::exists(p.string())) { - p = fs::path(base) / ("static_env." + std::to_string(++i)); + p = tmp / (base + "-static_env." + std::to_string(++i)); } return p; }