From c6534aa3f6fab27b5873a93ac8051809bcc60ee1 Mon Sep 17 00:00:00 2001 From: Zephyriony <142790847+zephyriony@users.noreply.github.com> Date: Tue, 4 Jun 2024 03:31:20 +0200 Subject: [PATCH] QUAL Update inc.php Adaptation of detect_dolibarr_main_data_root to handle more cases, especially when servers don't have htdocs --- htdocs/install/inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 54ee7c77842c1..948d5eebff9a7 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -720,8 +720,7 @@ function detect_dolibarr_main_document_root() */ function detect_dolibarr_main_data_root($dolibarr_main_document_root) { - $dolibarr_main_data_root = preg_replace("/\/htdocs$/", "", $dolibarr_main_document_root); - $dolibarr_main_data_root .= "/documents"; + $dolibarr_main_data_root = preg_replace("/\/[^\/]+$/", "/documents", $dolibarr_main_document_root); return $dolibarr_main_data_root; }