Unverified Commit ac01e625 authored by alexpott's avatar alexpott
Browse files

Issue #3192365 by Symbioquine, tbradbury, mxr576, alexpott, longwave: Race...

Issue #3192365 by Symbioquine, tbradbury, mxr576, alexpott, longwave: Race Condition in 'public://simpletest' mkdir Call
parent 15e1c658
......@@ -87,8 +87,8 @@ public function boot() {
// 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');
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment