Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-08-12 19:25:27 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2013-08-12 19:25:27 +0400
commit53bb89824deaf97095acf6bcc2997aa7141dd573 (patch)
tree8d1ef8a3d2d71295480c1da221fdf514097e9f1e /lib/util.php
parent0bab8935c95c249405f5b12f4724d189c4ec648b (diff)
check if some encrypted files are left after the app was disabled and warn the user
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 2586ad28320..cc432af62af 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -313,6 +313,23 @@ class OC_Util {
}
/**
+ * @brief check if there are still some encrypted files stored
+ * @return boolean
+ */
+ public static function encryptedFiles() {
+ //check if encryption was enabled in the past
+ $encryptedFiles = false;
+ if (OC_App::isEnabled('files_encryption') === false) {
+ $view = new OC\Files\View('/' . OCP\User::getUser());
+ if ($view->file_exists('/files_encryption/keyfiles')) {
+ $encryptedFiles = true;
+ }
+ }
+
+ return $encryptedFiles;
+ }
+
+ /**
* Check for correct file permissions of data directory
* @return array arrays with error messages and hints
*/