Fixed relative directories
authorAlexander Ebert <ebert@woltlab.com>
Tue, 27 Sep 2016 09:43:54 +0000 (11:43 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 27 Sep 2016 09:43:54 +0000 (11:43 +0200)
wcfsetup/install/files/lib/system/WCFSetup.class.php

index 788ef8f0c7382fec65085c6032c625676a72fa88..a11dd8a64d48cf5b2974bfb95b0f07b8a472ff1e 100644 (file)
@@ -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;
                        }
                }