Commit f2d73106 authored by Michael Gratton's avatar Michael Gratton 馃

Fix inifinite loop removing folders that have disappeared

Brown paper bag misuse of BidiIterator 馃檮
parent 5212730d
Pipeline #60965 failed with stages
in 16 minutes and 13 seconds
......@@ -1442,9 +1442,8 @@ public class GearyController : Geary.BaseObject {
Gee.BidirIterator<Geary.Folder> unavailable_iterator =
unavailable.bidir_iterator();
unavailable_iterator.last();
while (unavailable_iterator.valid) {
while (unavailable_iterator.previous()) {
Geary.Folder folder = unavailable_iterator.get();
unavailable_iterator.previous();
main_window.folder_list.remove_folder(folder);
if (folder.account == current_account) {
......
......@@ -1323,9 +1323,8 @@ internal class Geary.ImapEngine.UpdateRemoteFolders : AccountOperation {
Gee.BidirIterator<MinimalFolder> removed_iterator =
removed.bidir_iterator();
removed_iterator.last();
while (removed_iterator.valid) {
while (removed_iterator.previous()) {
MinimalFolder folder = removed_iterator.get();
removed_iterator.previous();
try {
debug("Locally deleting removed folder %s", folder.to_string());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment