isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 8457225a50d21d4b663af80c4a60202bb165a054
parent 481c12a8b31c6dd7eba048e8f42d0b9653110621
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Tue,  4 Aug 2020 00:23:33 +0200

use more appropriate return value in driver_t::select_box()

don't say DRV_CANCELED when it's really DRV_STORE_BAD, as apart from
being just wrong, it lead to the confusing effect of canceling a store
as the result of a supposed cancellation of the same store.

Diffstat:
Msrc/drv_maildir.c | 2+-
Msrc/sync.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/drv_maildir.c b/src/drv_maildir.c @@ -1269,7 +1269,7 @@ maildir_select_box( store_t *gctx, const char *name ) } } else { if (!(ctx->path = maildir_join_path( conf, 0, name ))) - return DRV_CANCELED; + return DRV_STORE_BAD; ctx->is_inbox = 0; } return ctx->path ? DRV_OK : DRV_BOX_BAD; diff --git a/src/sync.c b/src/sync.c @@ -1190,7 +1190,7 @@ sync_boxes( store_t *ctx[], const char * const names[], int present[], channel_c * don't run into uninitialized variables. */ for (t = 0; t < 2; t++) { switch (svars->drv[t]->select_box( ctx[t], svars->box_name[t] )) { - case DRV_CANCELED: + case DRV_STORE_BAD: store_bad( AUX ); return; case DRV_BOX_BAD: