Skip to content
Snippets Groups Projects
Commit 916f8593 authored by Björn Schießle's avatar Björn Schießle
Browse files

check if it is a share storage

parent 2a10e78c
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,11 @@ class Shared_Permissions extends Permissions {
*/
public function getDirectoryPermissions($parentId, $user) {
$fileCacheId = ($parentId === -1) ? $this->storage->getSourceId() : $parentId;
if ($parentId === -1 && $this->storage->instanceOfStorage('\OC\Files\Storage\Shared')) {
$fileCacheId = $this->storage->getSourceId();
} else {
$fileCacheId = $parentId;
}
$query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `parent` = ?');
$result = $query->execute(array($fileCacheId));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment