diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-10-24 16:15:17 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2018-10-24 16:53:39 +0200 |
commit | 87657fffd8aa3e7e8211b3c866b56042e78a922a (patch) | |
tree | 44f145d032ce3e5c0cb92c199834ccf138f08e16 /apps/encryption/lib | |
parent | 37782b1084275d54474700e4ae7863b18e23dc04 (diff) | |
download | nextcloud-server-87657fffd8aa3e7e8211b3c866b56042e78a922a.tar.gz nextcloud-server-87657fffd8aa3e7e8211b3c866b56042e78a922a.zip |
skip already encrypted files on encrypt all command
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r-- | apps/encryption/lib/Crypto/EncryptAll.php | 6 |
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(); |