diff --git a/lib/base.php b/lib/base.php
index eddcec97b1f531b5f426d77f7273bf17e7802540..391bcf865a0b0a4c5fef72d225e287b1d398426a 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -481,11 +481,7 @@ class OC {
 		$loaderStart = microtime(true);
 		require_once __DIR__ . '/autoloader.php';
 		self::$loader = new \OC\Autoloader([
-			OC::$SERVERROOT . '/lib',
-			OC::$SERVERROOT . '/core',
-			OC::$SERVERROOT . '/settings',
-			OC::$SERVERROOT . '/ocs',
-			OC::$SERVERROOT . '/ocs-provider',
+			OC::$SERVERROOT . '/lib/private/legacy',
 		]);
 		if (defined('PHPUNIT_RUN')) {
 			self::$loader->addValidRoot(OC::$SERVERROOT . '/tests');