]> source.dussan.org Git - nextcloud-server.git/commitdiff
Dont bother with stream_resolve_include_path if the path is already absolute
authorRobin Appelman <icewind@owncloud.com>
Fri, 27 Nov 2015 13:12:14 +0000 (14:12 +0100)
committerRobin Appelman <icewind@owncloud.com>
Fri, 27 Nov 2015 13:12:14 +0000 (14:12 +0100)
lib/autoloader.php

index f0fbd9e9f27cff3bdd7c6ae02d8738aeb0e6cd35..e41b4a08a6af8290961a9c3af7a21e3cac011c81 100644 (file)
@@ -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;
                                }