From da51ec38f4174532e83a4fde21f4c523e4f0bc7c Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 May 2017 11:59:49 +0200 Subject: only collect detailed access list if it is really needed Signed-off-by: Bjoern Schiessle --- lib/private/Encryption/Update.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/private/Encryption/Update.php') 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); -- cgit v1.2.3