Utility::sortFilenames(sortedList);
foreach (QString path, sortedList) {
path.remove(webdavFolder);
+
+ // Don't allow to select subfolders of encrypted subfolders
+ if (_account->capabilities().clientSideEncryptionAvailable() &&
+ _account->e2e()->isAnyParentFolderEncrypted(path)) {
+ continue;
+ }
+
QStringList paths = path.split('/');
if (paths.last().isEmpty())
paths.removeLast();
{
if (item) {
QString dir = item->data(0, Qt::UserRole).toString();
+
+ // We don't want to allow creating subfolders in encrypted folders outside of the sync logic
+ const auto encrypted = _account->capabilities().clientSideEncryptionAvailable() &&
+ _account->e2e()->isFolderEncrypted(dir + '/');
+ _ui.addFolderButton->setEnabled(!encrypted);
+
if (!dir.startsWith(QLatin1Char('/'))) {
dir.prepend(QLatin1Char('/'));
}
foreach (QString path, list) {
auto size = job ? job->_folderInfos[path].size : 0;
path.remove(pathToRemove);
+
+ // Don't allow to select subfolders of encrypted subfolders
+ if (_account->capabilities().clientSideEncryptionAvailable() &&
+ _account->e2e()->isAnyParentFolderEncrypted(_rootName + '/' + path)) {
+ continue;
+ }
+
QStringList paths = path.split('/');
if (paths.last().isEmpty())
paths.removeLast();