summaryrefslogtreecommitdiffstats
path: root/lib/autoloader.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/autoloader.php')
-rw-r--r--lib/autoloader.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php
index d7649781ea1..41a040b3f54 100644
--- a/lib/autoloader.php
+++ b/lib/autoloader.php
@@ -27,6 +27,8 @@
namespace OC;
+use \OCP\AutoloadNotAllowedException;
+
class Autoloader {
private $useGlobalClassPath = true;
@@ -58,7 +60,7 @@ class Autoloader {
* @param string $root
*/
public function addValidRoot($root) {
- $this->validRoots[] = $root;
+ $this->validRoots[] = stream_resolve_include_path($root);
}
/**
@@ -129,7 +131,7 @@ class Autoloader {
return true;
}
}
- throw new \Exception('Path not allowed: '. $fullPath);
+ throw new AutoloadNotAllowedException($fullPath);
}
/**