Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-06-17 13:42:57 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-06-30 12:29:08 +0300
commit839c056b8d595f7aa01ded27bbacc8f075b3bcfc (patch)
tree2ba4523790e9cb2ca09665291a05c4d6582215eb /src/gui/accountsettings.cpp
parent3bbc54ee6ca8834673f4055754762888b054ce96 (diff)
Don't show the encrypt action in subfolders of encrypted folders
Since we want to move to a place where the encryption of subfolders is always enforced it makes no sense to leave it in control of the user. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui/accountsettings.cpp')
-rw-r--r--src/gui/accountsettings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 2e9579638..9ee4d5ed6 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -556,8 +556,9 @@ void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index
// Verify if the folder is empty before attempting to encrypt.
bool isEncrypted = acc->e2e()->isFolderEncrypted(info->_path);
+ bool isParentEncrypted = acc->e2e()->isAnyParentFolderEncrypted(info->_path);
- if (!isEncrypted) {
+ if (!isEncrypted && !isParentEncrypted) {
ac = menu.addAction(tr("Encrypt"));
connect(ac, &QAction::triggered, [this, info] { slotMarkSubfolderEncrypted(info); });
} else {