Merge pull request #20792 from owncloud/autoloader-absolute-paths
Dont bother with stream_resolve_include_path if the path is already absolute
This commit is contained in:
commit
2b316eaa83
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue