Loading core/lib/Drupal/Core/File/FileSystem.php +13 −3 Original line number Diff line number Diff line Loading @@ -535,13 +535,23 @@ public function prepareDirectory(&$directory, $options = self::MODIFY_PERMISSION } if (!is_dir($directory)) { if (!($options & static::CREATE_DIRECTORY)) { return FALSE; } // Let mkdir() recursively create directories and use the default // directory permissions. if ($options & static::CREATE_DIRECTORY) { return @$this->mkdir($directory, NULL, TRUE); $success = @$this->mkdir($directory, NULL, TRUE); if ($success) { return TRUE; } // If the operation failed, check again if the directory was created // by another process/server, only report a failure if not. In this case // we still need to ensure the directory is writable. if (!is_dir($directory)) { return FALSE; } } $writable = is_writable($directory); if (!$writable && ($options & static::MODIFY_PERMISSIONS)) { Loading Loading
core/lib/Drupal/Core/File/FileSystem.php +13 −3 Original line number Diff line number Diff line Loading @@ -535,13 +535,23 @@ public function prepareDirectory(&$directory, $options = self::MODIFY_PERMISSION } if (!is_dir($directory)) { if (!($options & static::CREATE_DIRECTORY)) { return FALSE; } // Let mkdir() recursively create directories and use the default // directory permissions. if ($options & static::CREATE_DIRECTORY) { return @$this->mkdir($directory, NULL, TRUE); $success = @$this->mkdir($directory, NULL, TRUE); if ($success) { return TRUE; } // If the operation failed, check again if the directory was created // by another process/server, only report a failure if not. In this case // we still need to ensure the directory is writable. if (!is_dir($directory)) { return FALSE; } } $writable = is_writable($directory); if (!$writable && ($options & static::MODIFY_PERMISSIONS)) { Loading