]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix permission for movable storage root
authorRobin Appelman <icewind@owncloud.com>
Mon, 16 Jun 2014 14:20:40 +0000 (16:20 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 16 Jun 2014 14:20:40 +0000 (16:20 +0200)
lib/private/files/view.php

index afccdf9f733de00864b881f4e4f6f176dcd1662f..b168d177ab2debeb74bc28fd4e52fa49b4d32f6e 100644 (file)
@@ -836,11 +836,10 @@ class View {
                        return $data;
                }
                $path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
-               /**
-                * @var \OC\Files\Storage\Storage $storage
-                * @var string $internalPath
-                */
-               list($storage, $internalPath) = Filesystem::resolvePath($path);
+
+               $mount = Filesystem::getMountManager()->find($path);
+               $storage = $mount->getStorage();
+               $internalPath = $mount->getInternalPath($path);
                $data = null;
                if ($storage) {
                        $cache = $storage->getCache($internalPath);
@@ -888,6 +887,10 @@ class View {
                        return false;
                }
 
+               if ($mount instanceof MoveableMount) {
+                       $data['permissions'] |= \OCP\PERMISSION_DELETE | \OCP\PERMISSION_UPDATE;
+               }
+
                $data = \OC_FileProxy::runPostProxies('getFileInfo', $path, $data);
 
                return new FileInfo($path, $storage, $internalPath, $data);