Skip to content

Commit

Permalink
Avoid stack overflow in CreateDirectoriesRecursively
Browse files Browse the repository at this point in the history
Fixes #4262
  • Loading branch information
elupus committed Jun 19, 2023
1 parent b796f7d commit 349047e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion googletest/src/gtest-filepath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ bool FilePath::CreateDirectoriesRecursively() const {
return false;
}

if (pathname_.length() == 0 || this->DirectoryExists()) {
if (pathname_.length() == 0 || pathname_ == kCurrentDirectoryString || this->DirectoryExists()) {
return true;
}

Expand Down

0 comments on commit 349047e

Please sign in to comment.