From 2dc6398177445afb43eb9d3444e7927f72d87606 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen.haas@lakedrops.com>
Date: Fri, 9 Dec 2022 17:48:25 +0100
Subject: [PATCH] Undo previous fix and resolve problem with propper webRoot
 calculation

---
 src/Handler.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Handler.php b/src/Handler.php
index 8590848..f201302 100644
--- a/src/Handler.php
+++ b/src/Handler.php
@@ -343,7 +343,7 @@ class Handler extends BaseHandler {
       }
       $corePath = $installationManager->getInstallPath($drupalCorePackage);
       // Directory where Drupal's index.php is located.
-      $webRoot = dirname($corePath);
+      $webRoot = basename(dirname($corePath));
     }
     $this->config->setValue('webRoot', $webRoot, FALSE);
 
@@ -426,7 +426,7 @@ class Handler extends BaseHandler {
       if (isset($def['link']) && ($def['link'] !== $settingsPath)) {
         $link = $def['link'] . '/' . $filename;
         if (!$fs->exists($link)) {
-          $rel = substr($fs->makePathRelative($file, $projectRoot . '/' . $def['link']), 3, -1);
+          $rel = substr($fs->makePathRelative($file, $projectRoot . '/' . $link), 3, -1);
           $fs->symlink($rel, $link);
         }
       }
-- 
GitLab