diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-08-12 17:25:27 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-08-12 17:25:27 +0200 |
commit | 53bb89824deaf97095acf6bcc2997aa7141dd573 (patch) | |
tree | 8d1ef8a3d2d71295480c1da221fdf514097e9f1e /lib/util.php | |
parent | 0bab8935c95c249405f5b12f4724d189c4ec648b (diff) | |
download | nextcloud-server-53bb89824deaf97095acf6bcc2997aa7141dd573.tar.gz nextcloud-server-53bb89824deaf97095acf6bcc2997aa7141dd573.zip |
check if some encrypted files are left after the app was disabled and warn the user
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 17 |
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 */ |