X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fimap.c;h=cdf15378dd380ce3f8bb4c5609bc09ec97a30e18;hp=8521e355e1b3c4af3025ca74126d37e0cd4a180c;hb=5f3de22a46d6316a25ae1196fb99796a88bdcb6c;hpb=d4db7d12146c10828487f2039661934e5d6cc702 diff --git a/src/imap.c b/src/imap.c index 8521e355e..cdf15378d 100644 --- a/src/imap.c +++ b/src/imap.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team + * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2498,15 +2498,11 @@ static gint search_msgs (Folder *folder, if (result == MAILIMAP_ERROR_PROTOCOL) { debug_print("Server side search unavailable, using local search\n"); imap_handle_error(SESSION(session), NULL, result); - result = folder_item_search_msgs_local(folder, container, msgs, NULL, predicate, progress_cb, progress_data); - if (result < 0) { - debug_print("search_msgs - got protocol error, aborting\n"); - alertpanel_error_log(_("Search failed due to server error.")); - return -1; - } - - return result; - } if (result == MAILIMAP_NO_ERROR) { + return folder_item_search_msgs_local(folder, container, msgs, NULL, + predicate, progress_cb, progress_data); + } + + if (result == MAILIMAP_NO_ERROR) { gint result = 0; *msgs = imap_uid_list_from_lep(uidlist, &result);