Avoid stack overflow in CreateDirectoriesRecursively

Fixes #4262
This commit is contained in:
Joakim Plate 2023-06-01 11:08:56 +02:00 committed by GitHub
parent 04cf298916
commit 0e236d5c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,7 +335,7 @@ bool FilePath::CreateDirectoriesRecursively() const {
return false;
}
if (pathname_.length() == 0 || this->DirectoryExists()) {
if (pathname_.length() == 0 || pathname_ == kCurrentDirectoryString || this->DirectoryExists()) {
return true;
}