only show decrypt all files option if encrypted files are available

This commit is contained in:
Bjoern Schiessle 2013-07-30 12:26:07 +02:00
parent 3640c99462
commit c7eba69aea
1 changed files with 1 additions and 2 deletions

View File

@ -28,8 +28,7 @@ $languageCodes=OC_L10N::findAvailableLanguages();
$enableDecryptAll = false;
if (OC_App::isEnabled('files_encryption') === false) {
$view = new OC\Files\View('/'.OCP\User::getUser());
$remainingKeys = $view->getDirectoryContent('/files_encryption/keyfiles');
if (!empty($remainingKeys)) {
if($view->file_exists('/files_encryption/keyfiles')) {
$enableDecryptAll = true;
}
}