From 351cab6bce41b53f9efd4ba9aed4e7435f843691 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 27 Jul 2016 15:11:48 +0200 Subject: skip shared files, if files get decrypted only for a specific user we shouldn't touch files owned by a different user. --- lib/private/Encryption/DecryptAll.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private/Encryption') diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php index 6e309b5c892..b84395b9e17 100644 --- a/lib/private/Encryption/DecryptAll.php +++ b/lib/private/Encryption/DecryptAll.php @@ -210,6 +210,10 @@ class DecryptAll { while ($root = array_pop($directories)) { $content = $this->rootView->getDirectoryContent($root); foreach ($content as $file) { + // only decrypt files owned by the user + if($file->getStorage()->instanceOfStorage('OC\Files\Storage\Shared')) { + continue; + } $path = $root . '/' . $file['name']; if ($this->rootView->is_dir($path)) { $directories[] = $path; -- cgit v1.2.3