From f5aa0bfd9e9d499b3287c30fa708794a17e20a47 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 27 Sep 2016 11:43:54 +0200 Subject: [PATCH] Fixed relative directories --- wcfsetup/install/files/lib/system/WCFSetup.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 788ef8f0c7..a11dd8a64d 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -517,7 +517,10 @@ class WCFSetup extends WCF { // resolve path relative to document root $relativePath = FileUtil::getRelativePath($documentRoot, INSTALL_SCRIPT_DIR); foreach ($packages as $application => $packageData) { - self::$directories[$application] = $relativePath . ($application === 'wcf' ? '' : $packageData['directory'] . '/'); + $dir = $relativePath . ($application === 'wcf' ? '' : $packageData['directory'] . '/'); + if (mb_strpos($dir, './') === 0) $dir = mb_substr($dir, 1); + + self::$directories[$application] = $dir; } } -- 2.20.1