summaryrefslogtreecommitdiffstats
path: root/lib/private/Encryption/Update.php
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-05-30 11:59:49 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-07-06 11:33:08 +0200
commitda51ec38f4174532e83a4fde21f4c523e4f0bc7c (patch)
tree3939c7805a222e0e180a8999b47632a5e76674fb /lib/private/Encryption/Update.php
parent9c5ba2f12cf8f3a7b3587fd8ef304aed86e703e1 (diff)
downloadnextcloud-server-da51ec38f4174532e83a4fde21f4c523e4f0bc7c.tar.gz
nextcloud-server-da51ec38f4174532e83a4fde21f4c523e4f0bc7c.zip
only collect detailed access list if it is really needed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/private/Encryption/Update.php')
-rw-r--r--lib/private/Encryption/Update.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Encryption/Update.php b/lib/private/Encryption/Update.php
index ad40183767b..94d64b73504 100644
--- a/lib/private/Encryption/Update.php
+++ b/lib/private/Encryption/Update.php
@@ -168,6 +168,14 @@ class Update {
*/
public function update($path) {
+ $encryptionModule = $this->encryptionManager->getEncryptionModule();
+
+ // if the encryption module doesn't encrypt the files on a per-user basis
+ // we have nothing to do here.
+ if ($encryptionModule->needDetailedAccessList() === false) {
+ return;
+ }
+
// if a folder was shared, get a list of all (sub-)folders
if ($this->view->is_dir($path)) {
$allFiles = $this->util->getAllFiles($path);
@@ -175,7 +183,7 @@ class Update {
$allFiles = array($path);
}
- $encryptionModule = $this->encryptionManager->getEncryptionModule();
+
foreach ($allFiles as $file) {
$usersSharing = $this->file->getAccessList($file);