From: Matthieu Gallien Date: Wed, 21 Aug 2024 13:50:04 +0000 (+0200) Subject: only add encrypt menu entry for top folders X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~49^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1c3743d67005ba6e30557e8231f7ee5b2c16e497;p=nextcloud-desktop.git only add encrypt menu entry for top folders with current end-to-end encryption only top folders can be encrypted limit the availability of the menu entry to top folders Signed-off-by: Matthieu Gallien --- diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index a3c0186e3..5b7206713 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -1257,7 +1257,7 @@ void SocketApi::sendEncryptFolderCommandMenuEntries(const QFileInfo &fileInfo, ancestor = ancestor.parentFolder(); } - if (!anyAncestorEncrypted) { + if (!anyAncestorEncrypted && !fileData.parentFolder().journalRecord().isValid()) { const auto isOnTheServer = fileData.journalRecord().isValid(); const auto flagString = isOnTheServer ? QLatin1String("::") : QLatin1String(":d:"); listener->sendMessage(QStringLiteral("MENU_ITEM:ENCRYPT") + flagString + tr("Encrypt"));