Browse Source

improve reporting of failure to open previously present mailbox

tell explicitly that the box cannot be opened _any more_, so it's clear
that Delete, rather than Create, would apply.

fwiw, it would be preferable to actually differentiate between absent
mailboxes and ones that fail to open for other reasons. but
unfortunately, IMAP doesn't report the difference (gmail has a
non-standard [NONEXISTENT] response code, though).
master
Oswald Buddenhagen 4 months ago
parent
commit
17c9cc1140
  1. 4
      src/sync.c

4
src/sync.c

@ -440,12 +440,12 @@ box_confirmed2( sync_vars_t *svars, int t )
}
if (svars->existing) {
if (!(svars->chan->ops[t^1] & OP_REMOVE)) {
error( "Error: channel %s: %s box %s cannot be opened.\n",
error( "Error: channel %s: %s box %s cannot be opened anymore.\n",
svars->chan->name, str_fn[t], svars->orig_name[t] );
goto bail;
}
if (svars->drv[t^1]->confirm_box_empty( svars->ctx[t^1] ) != DRV_OK) {
warn( "Warning: channel %s: %s box %s cannot be opened and %s box %s is not empty.\n",
warn( "Warning: channel %s: %s box %s cannot be opened anymore, and %s box %s is not empty.\n",
svars->chan->name, str_fn[t], svars->orig_name[t], str_fn[t^1], svars->orig_name[t^1] );
goto done;
}

Loading…
Cancel
Save