diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-11-27 14:12:14 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-11-27 14:12:14 +0100 |
commit | 50474c6041adc2be420c48c4acb6fd42b646215a (patch) | |
tree | a73d3bd7402d98053c1755664d25b361466287f7 /lib/autoloader.php | |
parent | 8fe878afe9af165b98470a75203df2f1b32cb68f (diff) | |
download | nextcloud-server-50474c6041adc2be420c48c4acb6fd42b646215a.tar.gz nextcloud-server-50474c6041adc2be420c48c4acb6fd42b646215a.zip |
Dont bother with stream_resolve_include_path if the path is already absolute
Diffstat (limited to 'lib/autoloader.php')
-rw-r--r-- | lib/autoloader.php | 6 |
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; } |