From a23db4688acf73d141960a2f437d34fa50f7a6a1 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 12 Dec 2022 12:12:46 +0100 Subject: [PATCH] Don't show Encrypt menu entry if server does not support E2EE Signed-off-by: Claudio Cambra --- src/gui/socketapi/socketapi.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index 10166399b..48d2e675b 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -1166,7 +1166,12 @@ void SocketApi::sendEncryptFolderCommandMenuEntries(const QFileInfo &fileInfo, const bool isE2eEncryptedPath, const OCC::SocketListener* const listener) const { - if (!fileInfo.isDir() || isE2eEncryptedPath) { + if (!fileData.folder || + !fileData.folder->accountState() || + !fileData.folder->accountState()->account() || + !fileData.folder->accountState()->account()->capabilities().clientSideEncryptionAvailable() || + !fileInfo.isDir() || + isE2eEncryptedPath) { return; }