From 6252deb6cade8376a02fefe9092166aa7c64dfba Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Tue, 16 Apr 2019 17:22:56 +0900 Subject: [PATCH] Revert "Issue #3040166 by willzyx, Mile23, alexpott, cilefen: mkdir() fails in BrowserHtmlDebugTrait.php:141 because of a race condition" This reverts commit c080fb87f3922c276ac095ff4b59c37ee67f01cb. (cherry picked from commit fe33718231b2898bdfe94f67457576d4432b2183) --- core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php index dcbada448aac..f06a5442f45e 100644 --- a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php +++ b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php @@ -137,8 +137,8 @@ protected function initBrowserOutputFile() { $this->htmlOutputDirectory = DRUPAL_ROOT . '/sites/simpletest/browser_output'; // Do not use the file_system service so this method can be called before // it is available. - if (!is_dir($this->htmlOutputDirectory) && !mkdir($this->htmlOutputDirectory, 0775, TRUE) && !is_dir($this->htmlOutputDirectory)) { - throw new \RuntimeException(sprintf('Unable to create directory: %s', $this->htmlOutputDirectory)); + if (!is_dir($this->htmlOutputDirectory)) { + mkdir($this->htmlOutputDirectory, 0775, TRUE); } if (!file_exists($this->htmlOutputDirectory . '/.htaccess')) { file_put_contents($this->htmlOutputDirectory . '/.htaccess', "<IfModule mod_expires.c>\nExpiresActive Off\n</IfModule>\n"); -- GitLab