Skip to content

Commit

Permalink
sync_support: don't cache intermediate records
Browse files Browse the repository at this point in the history
  • Loading branch information
brong committed Jan 3, 2025
1 parent d2e2787 commit 6615e04
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions imap/sync_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -6551,14 +6551,13 @@ int sync_do_update_mailbox(struct sync_client_state *sync_cs,
sync_send_apply(kl, sync_cs->backend->out);
r = sync_parse_response("MAILBOX", sync_cs->backend->in, NULL);

// on error, clear cache - otherwise cache this state
if (r) sync_uncache(sync_cs, mbentry->name);
else r = sync_cache(sync_cs, mbentry->name, kl);

dlist_free(&kl);
mboxlist_entry_free(&mbentry);

return 0;
// we never want to cache intermediate records
sync_uncache(sync_cs, mbentry->name);

return r;
}

mboxlist_entry_free(&mbentry);
Expand Down

0 comments on commit 6615e04

Please sign in to comment.