From 0bc6d380c5f4854619df7bf22abd035bbb8b4eb9 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 24 Sep 2021 18:22:24 +0200 Subject: [PATCH] Don't call MessageStore.deleteFolders() with an empty list --- .../src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt b/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt index 5fc159cba..566a13ca4 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt +++ b/app/core/src/main/java/com/fsck/k9/mailstore/K9BackendStorage.kt @@ -60,7 +60,9 @@ class K9BackendStorage( } override fun deleteFolders(folderServerIds: List) { - messageStore.deleteFolders(folderServerIds) + if (folderServerIds.isNotEmpty()) { + messageStore.deleteFolders(folderServerIds) + } } override fun changeFolder(folderServerId: String, name: String, type: RemoteFolderType) {