This commit is contained in:
Joakim Plate 2025-03-28 14:46:12 +01:00 committed by GitHub
commit 847f09b88b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,9 +221,10 @@ static FILE* OpenFileForWriting(const std::string& output_file) {
FilePath output_file_path(output_file);
FilePath output_dir(output_file_path.RemoveFileName());
if (output_dir.CreateDirectoriesRecursively()) {
fileout = posix::FOpen(output_file.c_str(), "w");
if (!output_dir.CreateDirectoriesRecursively()) {
GTEST_LOG_(WARNING) << "Unable to create path to file \"" << output_file << "\"";
}
fileout = posix::FOpen(output_file.c_str(), "w");
if (fileout == nullptr) {
GTEST_LOG_(FATAL) << "Unable to open file \"" << output_file << "\"";
}