summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-24 18:27:03 +0200
committerGitHub <noreply@github.com>2018-10-24 18:27:03 +0200
commit410bd9d784fdd3f365cd1755f46265fbb28fbc15 (patch)
treec5323311a03027f89045bbb9745b4c59109a14f0 /lib
parent37782b1084275d54474700e4ae7863b18e23dc04 (diff)
parentd76a87f3b0ad3f96373984db31470463b1fdc946 (diff)
downloadnextcloud-server-410bd9d784fdd3f365cd1755f46265fbb28fbc15.tar.gz
nextcloud-server-410bd9d784fdd3f365cd1755f46265fbb28fbc15.zip
Merge pull request #12018 from nextcloud/improve-encrypt-all
Improve encrypt all / decrypt all
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Encryption/DecryptAll.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php
index 12bda54a52e..16eee347334 100644
--- a/lib/private/Encryption/DecryptAll.php
+++ b/lib/private/Encryption/DecryptAll.php
@@ -252,6 +252,12 @@ class DecryptAll {
*/
protected function decryptFile($path) {
+ // skip already decrypted files
+ $fileInfo = $this->rootView->getFileInfo($path);
+ if ($fileInfo !== false && !$fileInfo->isEncrypted()) {
+ return true;
+ }
+
$source = $path;
$target = $path . '.decrypted.' . $this->getTimestamp();