Skip to content

Commit

Permalink
lib-storage: Mailbox list rebuild - avoid opening mailbox on recovery…
Browse files Browse the repository at this point in the history
… name collision

If recovered-lost-folder-$guid already unexpectedly exists, there's no need
to open it (at this point) to try to recover its name. This didn't really harm
anything, so it mainly fixes the code logic to make sense.
  • Loading branch information
sirainen committed Oct 17, 2024
1 parent 9561790 commit 218ea7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-storage/list/mail-storage-list-index-rebuild.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ mail_storage_list_index_try_create(struct mail_storage_list_index_rebuild_ctx *c
}
mailbox_free(&box);

if (ret < 0)
if (ret <= 0)
return ret;

/* open a second time to rename the mailbox to its original name,
Expand Down

0 comments on commit 218ea7c

Please sign in to comment.