From 1401e36e75ce280467cde68642adbf8bd4d18aeb Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 16 Oct 2020 08:53:14 +0200 Subject: [PATCH] Move onto self should not happen --- app/src/main/java/eu/faircode/email/Core.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 09254cf9f7..23696a0cc8 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -949,7 +949,7 @@ class Core { if (target == null) throw new FolderNotFoundException(); if (folder.id.equals(target.id)) - return; + throw new IllegalArgumentException("self"); IMAPFolder itarget = (IMAPFolder) istore.getFolder(target.name); @@ -1109,7 +1109,7 @@ class Core { if (target == null) throw new FolderNotFoundException(); if (folder.id.equals(target.id)) - return; + throw new IllegalArgumentException("self"); // Move from trash/drafts only if (!EntityFolder.TRASH.equals(folder.type) &&