Issue #3192365 by Symbioquine, tbradbury, mxr576, alexpott, longwave: Race Condition in 'public://simpletest' mkdir Call

merge-requests/937/head
Alex Pott 2021-10-07 10:04:36 +01:00
parent 15e1c6582f
commit ac01e62552
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
1 changed files with 2 additions and 2 deletions

View File

@ -87,8 +87,8 @@ class TestRunnerKernel extends DrupalKernel {
// Create the build/artifacts directory if necessary.
include_once $this->getAppRoot() . '/core/includes/file.inc';
if (!is_dir('public://simpletest')) {
mkdir('public://simpletest', 0777, TRUE);
if (!is_dir('public://simpletest') && !@mkdir('public://simpletest', 0777, TRUE) && !is_dir('public://simpletest')) {
throw new \RuntimeException('Unable to create directory: public://simpletest');
}
}