summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Crypto/EncryptAll.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/lib/Crypto/EncryptAll.php')
-rw-r--r--apps/encryption/lib/Crypto/EncryptAll.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php
index c2619dc8ef1..ee13fee9eef 100644
--- a/apps/encryption/lib/Crypto/EncryptAll.php
+++ b/apps/encryption/lib/Crypto/EncryptAll.php
@@ -295,6 +295,12 @@ class EncryptAll {
*/
protected function encryptFile($path) {
+ // skip already encrypted files
+ $fileInfo = $this->rootView->getFileInfo($path);
+ if ($fileInfo !== false && $fileInfo->isEncrypted()) {
+ return true;
+ }
+
$source = $path;
$target = $path . '.encrypted.' . time();