[Pkg-owncloud-commits] [owncloud] 164/223: Fix permission for movable storage root
David Prévot
taffit at moszumanska.debian.org
Sun Jun 22 01:54:20 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 0532f5c39abfa8109fd1aacee93e244ac31cd42f
Author: Robin Appelman <icewind at owncloud.com>
Date: Mon Jun 16 16:20:40 2014 +0200
Fix permission for movable storage root
---
lib/private/files/view.php | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index afccdf9..b168d17 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list