From 72ff9601148b8f5514f686f7e8d8ad1e68d6b343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Tue, 24 Aug 2021 18:01:09 +0200 Subject: [PATCH] [snappymail] Allow deletion of parent folder with subfolders This change brings snappymails behaviour in line with RFC3501, section 6.3.4, by allowing "real" (i.e. non-\Noselect) parent folders to be deleted and by not performing a recursive deletion of subfolders. --- dev/Model/FolderCollection.js | 2 +- dev/Settings/User/Folders.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/Model/FolderCollection.js b/dev/Model/FolderCollection.js index bcc2b4967..afda8e867 100644 --- a/dev/Model/FolderCollection.js +++ b/dev/Model/FolderCollection.js @@ -304,7 +304,7 @@ export class FolderModel extends AbstractModel { return null; }, - canBeDeleted: () => !folder.isSystemFolder() && !folder.subFolders().length, + canBeDeleted: () => !folder.isSystemFolder() && folder.selectable, canBeSubscribed: () => !folder.isSystemFolder() && SettingsUserStore.hideUnsubscribed() diff --git a/dev/Settings/User/Folders.js b/dev/Settings/User/Folders.js index 54f7689b5..6404f4007 100644 --- a/dev/Settings/User/Folders.js +++ b/dev/Settings/User/Folders.js @@ -98,7 +98,7 @@ export class FoldersUserSettings { if (folderToRemove === folder) { return true; } - folder.subFolders.remove(fRemoveFolder); + //folder.subFolders.remove(fRemoveFolder); return false; };