aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-27 16:03:39 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-27 16:03:39 +0100
commit2b316eaa83212bdbdb5e3ac7342719122ac378a2 (patch)
tree67822a7b1cafc888276620bab5e7789b13438561
parenta92a354c22baaea5a1f22cb1995d6b69fa4db780 (diff)
parent50474c6041adc2be420c48c4acb6fd42b646215a (diff)
downloadnextcloud-server-2b316eaa83212bdbdb5e3ac7342719122ac378a2.tar.gz
nextcloud-server-2b316eaa83212bdbdb5e3ac7342719122ac378a2.zip
Merge pull request #20792 from owncloud/autoloader-absolute-paths
Dont bother with stream_resolve_include_path if the path is already absolute
-rw-r--r--lib/autoloader.php6
1 files changed, 5 insertions, 1 deletions
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;
}