only show decrypt all files option if encrypted files are available
This commit is contained in:
parent
3640c99462
commit
c7eba69aea
|
@ -28,8 +28,7 @@ $languageCodes=OC_L10N::findAvailableLanguages();
|
||||||
$enableDecryptAll = false;
|
$enableDecryptAll = false;
|
||||||
if (OC_App::isEnabled('files_encryption') === false) {
|
if (OC_App::isEnabled('files_encryption') === false) {
|
||||||
$view = new OC\Files\View('/'.OCP\User::getUser());
|
$view = new OC\Files\View('/'.OCP\User::getUser());
|
||||||
$remainingKeys = $view->getDirectoryContent('/files_encryption/keyfiles');
|
if($view->file_exists('/files_encryption/keyfiles')) {
|
||||||
if (!empty($remainingKeys)) {
|
|
||||||
$enableDecryptAll = true;
|
$enableDecryptAll = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue