summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-06-16 16:20:40 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-16 16:20:40 +0200
commit0532f5c39abfa8109fd1aacee93e244ac31cd42f (patch)
treea96fddfceb8f8e38bc4303fb95a4083ece2cda0b
parent3ed4e5b26b4b1b253506525aedd9b8d0b8bd649b (diff)
downloadnextcloud-server-0532f5c39abfa8109fd1aacee93e244ac31cd42f.tar.gz
nextcloud-server-0532f5c39abfa8109fd1aacee93e244ac31cd42f.zip
Fix permission for movable storage root
-rw-r--r--lib/private/files/view.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index afccdf9f733..b168d177ab2 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -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);