diff --git a/lib/autoloader.php b/lib/autoloader.php
index 8b12e6bc4b7c54bb858c9b126dc2aa1603739d85..b5b58918372f563e844851255254b8abc617eeba 100644
--- a/lib/autoloader.php
+++ b/lib/autoloader.php
@@ -77,6 +77,7 @@ class Autoloader {
 			$paths[] = 'private/' . strtolower(str_replace('_', '/', substr($class, 3)) . '.php');
 		} elseif (strpos($class, 'OC\\') === 0) {
 			$paths[] = 'private/' . strtolower(str_replace('\\', '/', substr($class, 3)) . '.php');
+			$paths[] = strtolower(str_replace('\\', '/', substr($class, 3)) . '.php');
 		} elseif (strpos($class, 'OCP\\') === 0) {
 			$paths[] = 'public/' . strtolower(str_replace('\\', '/', substr($class, 4)) . '.php');
 		} elseif (strpos($class, 'OCA\\') === 0) {
diff --git a/tests/lib/autoloader.php b/tests/lib/autoloader.php
index b182dc8747795fae5c777e901526f1d36f9fe7c9..314a8ebee8d4c9ca86d101f0658d4b2555db4acb 100644
--- a/tests/lib/autoloader.php
+++ b/tests/lib/autoloader.php
@@ -19,11 +19,11 @@ class AutoLoader extends \PHPUnit_Framework_TestCase {
 	}
 
 	public function testLeadingSlashOnClassName() {
-		$this->assertEquals(array('private/files/storage/local.php'), $this->loader->findClass('\OC\Files\Storage\Local'));
+		$this->assertEquals(array('private/files/storage/local.php', 'files/storage/local.php'), $this->loader->findClass('\OC\Files\Storage\Local'));
 	}
 
 	public function testNoLeadingSlashOnClassName() {
-		$this->assertEquals(array('private/files/storage/local.php'), $this->loader->findClass('OC\Files\Storage\Local'));
+		$this->assertEquals(array('private/files/storage/local.php', 'files/storage/local.php'), $this->loader->findClass('OC\Files\Storage\Local'));
 	}
 
 	public function testLegacyPath() {
@@ -54,7 +54,7 @@ class AutoLoader extends \PHPUnit_Framework_TestCase {
 	}
 
 	public function testLoadCoreNamespace() {
-		$this->assertEquals(array('private/foo/bar.php'), $this->loader->findClass('OC\Foo\Bar'));
+		$this->assertEquals(array('private/foo/bar.php', 'foo/bar.php'), $this->loader->findClass('OC\Foo\Bar'));
 	}
 
 	public function testLoadCore() {