mirror of
https://github.com/google/googletest.git
synced 2026-02-06 09:49:54 +08:00
Merge f1c62fdfec53515dd3bcbd6f5dd52aadce18a0d2 into 9156d4caac880b513264ecbe0aa4746a3fead3d7
This commit is contained in:
commit
d74bad429c
@ -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 << "\"";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user