commit d54c22d20e5d3173c5398c2e9fc5e87837a26963 Author: Oswald Buddenhagen <o...@users.sf.net> Date: Tue Aug 6 15:16:27 2024 +0200
fix IMAP INBOX case normalization while is_INBOX() was adjusted to work with not null-terminated strings, is_inbox() wasn't. amends 3aead33. src/drv_imap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index cbf5804..b4c05fd 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -1530,7 +1530,7 @@ is_inbox( imap_store_t *ctx, const char *arg, int argl ) { if (!starts_with_upper( arg, argl, "INBOX", 5 )) return 0; - if (arg[5] && arg[5] != ctx->delimiter[0]) + if (argl > 5 && arg[5] != ctx->delimiter[0]) return 0; return 1; } @@ -3602,7 +3602,7 @@ imap_list_store( store_t *gctx, int flags, // path | P [i] | i [P] | P // int pfx_is_empty = !*ctx->prefix; - int pfx_is_inbox = !pfx_is_empty && is_inbox( ctx, ctx->prefix, -1 ); + int pfx_is_inbox = !pfx_is_empty && is_inbox( ctx, ctx->prefix, strlen( ctx->prefix ) ); if (((flags & (LIST_PATH | LIST_PATH_MAYBE)) || pfx_is_empty) && !pfx_is_inbox && !(ctx->listed & LIST_PATH)) { ctx->listed |= LIST_PATH; if (pfx_is_empty) _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel