summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Loader.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index c399f296d..1726f0a53 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -558,7 +558,14 @@ class CI_Loader {
if ( ! class_exists('CI_Driver_Library'))
{
// we aren't instantiating an object here, that'll be done by the Library itself
- require_once BASEPATH.'libraries/Driver'.EXT;
+ require BASEPATH.'libraries/Driver'.EXT;
+ }
+
+ // We can save the loader some time since Drivers will *always* be in a subfolder,
+ // and typically identically named to the library
+ if ( ! strpos($library, '/'))
+ {
+ $library = $library.'/'.$library;
}
return $this->library($library, $params, $object_name);