Unverified Commit bc19eaea authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3040166 follow-up by Lendude: mkdir() fails in...

Issue #3040166 follow-up by Lendude: mkdir() fails in BrowserHtmlDebugTrait.php:141 because of a race condition

(cherry picked from commit 1ffbb8eb)
parent 14e576ad
Loading
Loading
Loading
Loading
+1 −1
Changes for core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ protected function initBrowserOutputFile() {
      // concurrent test might have made the directory and caused mkdir() to
      // fail. In this case we can still use the directory even though we failed
      // to make it.
      if (!is_dir($this->htmlOutputDirectory) && !mkdir($this->htmlOutputDirectory, 0775, TRUE) && !is_dir($this->htmlOutputDirectory)) {
      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 (!file_exists($this->htmlOutputDirectory . '/.htaccess')) {