]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix messed up mounts
authorRobin Appelman <icewind@owncloud.com>
Sun, 6 Jan 2013 23:36:39 +0000 (00:36 +0100)
committerRobin Appelman <icewind@owncloud.com>
Sun, 6 Jan 2013 23:36:39 +0000 (00:36 +0100)
lib/files/filesystem.php

index d9487bde806e333c5d08709129a40b50ad26c6ca..b3ba62c3a493597376037fe61fd4aa0056492cea 100644 (file)
@@ -364,14 +364,14 @@ class Filesystem {
                if (strlen($mountpoint) > 1) {
                        $mountpoint .= '/';
                }
-               // Update old classes to new namespace
-               if (strpos($class, 'OC_Filestorage_') !== false) {
-                       $class = '\OC\Files\Storage\\'.substr($class, 15);
-               }
                if ($class instanceof \OC\Files\Storage\Storage) {
                        self::$mounts[$mountpoint] = array('class' => get_class($class), 'arguments' => $arguments);
                        self::$storages[$mountpoint] = $class;
                } else {
+                       // Update old classes to new namespace
+                       if (strpos($class, 'OC_Filestorage_') !== false) {
+                               $class = '\OC\Files\Storage\\'.substr($class, 15);
+                       }
                        self::$mounts[$mountpoint] = array('class' => $class, 'arguments' => $arguments);
                }
        }