<<< Date Index >>>     <<< Thread Index >>>

Re: Problem with IMAP folder browsing



On Friday, 06 January 2006 at 13:08, Brian Weaver wrote:
> I managed to test a modified version of the patch against 1.5.10i that I
> downloaded from mutt.org and configured to install in my tmp directory.
> When I ran the unpatched version it exhibited the same behavior that I
> described originally. When I compiled and ran a patched version it work
> as it had previous.
> 
> My only conclusion is that whoever built the mandrake package on my old
> server knew about the problem, patched it for the RPM, and left it at
> that. 
> 
> Here is the patch for 1.5.10i
> 
> diff -urN mutt-1.5.10/imap/browse.c mutt-1.5.10-fixed/imap/browse.c
> +++ mutt-1.5.10-fixed/imap/browse.c   2006-01-06 12:48:18.469541889 -0500
> @@ -126,7 +126,8 @@
>            if (!noinferiors && cur_folder[0] &&
>              (n = strlen (mbox)) < LONG_STRING-1)
>            {
> -            mbox[n++] = idata->delim;
> +            if(mbox[n-1] != idata->delim)
> +              mbox[n++] = idata->delim;
>              mbox[n] = '\0';
>            }
>          }

I don't actually understand what this patch is doing, since that
entire section should be enclosed in an
  if (mbox[n-1] != idata->delim)
block. Perhaps idata->delim is incorrect until the list command is
run?

I'm not 100% sure whether this is the right place to fix this. On the
other hand, the entire IMAP browser is a train wreck I haven't had the
stomach to salvage yet. So I'll let this simmer for a couple of days
and apply it if I can't think of something better.

Can you try CVS btw? the list parser was changed a little bit and may
have perturbed this buglet.