summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-24 13:39:37 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-24 13:39:37 +0200
commit84d36df70b7bfb5e7cf79c7a089675d79943084d (patch)
tree23a6a6c7a88a3d0402ff2d533ac051001c269b6d
parent6a4a474aa94202c0d675b86fab384f509b9522f6 (diff)
downloadnextcloud-server-84d36df70b7bfb5e7cf79c7a089675d79943084d.tar.gz
nextcloud-server-84d36df70b7bfb5e7cf79c7a089675d79943084d.zip
make sure that we always return the correct permissions
-rw-r--r--apps/files_sharing/lib/cache.php6
-rw-r--r--lib/private/files/view.php4
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 7a6b70d82b5..6bc9e131949 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -95,9 +95,9 @@ class Shared_Cache extends Cache {
}
$data['uid_owner'] = $this->storage->getOwner($file);
if (isset($data['permissions'])) {
- $data['permissions'] &= $this->storage->getPermissions('');
+ $data['permissions'] &= $this->storage->getPermissions($file);
} else {
- $data['permissions'] = $this->storage->getPermissions('');
+ $data['permissions'] = $this->storage->getPermissions($file);
}
return $data;
}
@@ -163,7 +163,7 @@ class Shared_Cache extends Cache {
$sourceFolderContent[$key]['path'] = $dir . $c['name'];
$sourceFolderContent[$key]['uid_owner'] = $parent['uid_owner'];
$sourceFolderContent[$key]['displayname_owner'] = $parent['uid_owner'];
- $sourceFolderContent[$key]['permissions'] = $sourceFolderContent[$key]['permissions'] & $this->storage->getPermissions('');
+ $sourceFolderContent[$key]['permissions'] = $sourceFolderContent[$key]['permissions'] & $this->storage->getPermissions($dir . $c['name']);
}
return $sourceFolderContent;
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 91d7ea260d3..48e7cb85bef 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -884,8 +884,8 @@ class View {
if ($extOnly && $subStorage instanceof \OC\Files\Storage\Shared) {
continue;
}
- $subCache = $subStorage->getCache('');
- $rootEntry = $subCache->get('');
+ $subCache = $subStorage->getCache($internalPath);
+ $rootEntry = $subCache->get($internalPath);
$data['size'] += isset($rootEntry['size']) ? $rootEntry['size'] : 0;
}
}