From: Robin Appelman Date: Fri, 27 Nov 2015 13:12:14 +0000 (+0100) Subject: Dont bother with stream_resolve_include_path if the path is already absolute X-Git-Tag: v9.0beta1~655^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=50474c6041adc2be420c48c4acb6fd42b646215a;p=nextcloud-server.git Dont bother with stream_resolve_include_path if the path is already absolute --- diff --git a/lib/autoloader.php b/lib/autoloader.php index f0fbd9e9f27..e41b4a08a6a 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -170,7 +170,11 @@ class Autoloader { // No cache or cache miss $pathsToRequire = array(); foreach ($this->findClass($class) as $path) { - $fullPath = stream_resolve_include_path($path); + if ($path[0] === '/') { + $fullPath = file_exists($path) ? $path : false; + } else { + $fullPath = stream_resolve_include_path($path); + } if ($fullPath && $this->isValidPath($fullPath)) { $pathsToRequire[] = $fullPath; }