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

Re: Problem with IMAP folder browsing



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/imap/browse.c   2005-08-11 15:37:02.000000000 -0400
+++ 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';
           }
         }


Brian Weaver [brianweaver@xxxxxxxxx] wrote on Fri, Jan 06, 2006 at 12:44:13PM 
-0500:
> I think I tracked down the source of my problem, but I'm having one heck
> of a time trying to rebuild as a debian package. I'm not sure what
> options were passed to configure and I was trying to avoid a make
> install that would clobber existing files under package control on my
> debian system.
> 
> Is there any developer on the list that could let me know if this patch
> seems reasonable. I'm going to continue to see if I can get it built
> correctly so I can test. I'd just like a second set of eyes to let me
> know if I'm barking up the wrong tree.
> 
> Thanks
> 
> -Brian
> 
> == START PATCH
> diff -urN mutt-1.5.9/imap/browse.c mutt-1.5.9-fixed/imap/browse.c
> --- mutt-1.5.9/imap/browse.c  2005-02-19 08:49:49.000000000 -0500
> +++ mutt-1.5.9-fixed/imap/browse.c    2006-01-06 11:38:55.203109937 -0500
> @@ -124,7 +124,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';
>            }
>          }
> == END PATCH
> 
> The patch is suppose to avoid adding all the extra '/' (idata->delim)
> characters when not necessary.
> 
> Brian Weaver [brianweaver@xxxxxxxxx] wrote on Wed, Jan 04, 2006 at 05:23:38PM 
> -0500:
> > Looks like I have some idea of where to look now. Seems that my version
> > of mutt was compiled with debugging enabled. Using 'mutt -d 10' I got
> > the following in the log...
> > 
> > /* snip */
> > imap_browse: mbox: Lists
> > > a0073 LIST "" "Lists"
> > < * LIST () "/" "Lists"
> > < * LIST () "/" "Lists/Cryptogram"
> > < * LIST () "/" "Lists/Freshmeat"
> > < * LIST () "/" "Lists/GNessus"
> > < * LIST () "/" "Lists/LinuxFS"
> > < * LIST () "/" "Lists/LinuxKernel"
> > < * LIST () "/" "Lists/Mutt"
> > < * LIST () "/" "Lists/Oculan"
> > < * LIST () "/" "Lists/Security"
> > < * LIST () "/" "Lists/XenSource"
> > < a0073 OK LIST completed
> > imap_init_browse: adding parent Lists////////
> > imap_browse: Quoting mailbox scan: Lists////////// -> "Lists//////////%"
> > > a0074 LIST "" "Lists//////////%"
> > < a0074 OK LIST completed
> > /* snip */
> > 
> > Notice the imap_init_browse() is what *appears* to be incorrect.
> > 
> > -Brian
> > 
> > Kyle Wheeler [kyle-mutt@xxxxxxxxxxxxxx] wrote on Wed, Jan 04, 2006 at 
> > 02:25:32PM -0500:
> > > On Wednesday, January  4 at 01:12 PM, quoth Brian Weaver:
> > > >I get the root folder OK, but when I select a sub folder with the
> > > ><enter> key all that shows up is '/..' as the sole entry. I've changed
> > > >the file mask to '.' but no such luck. If I hit <enter> while the '/..'
> > > >entry is highlighted then the folder changes to something like:
> > > >
> > > > 'Lists/////////'
> > > 
> > > The problem you're running into is one that I've noticed. It's a result 
> > > of Mutt depending on the CHILDREN IMAP extension to determine whether a 
> > > folder has sub-folders or not. I'm guessing that dbmail doesn't support 
> > > the CHILDREN extension? If you use <space> instead of <enter> when 
> > > selecting a folder, you'll see it's contents (it's the "view-file" 
> > > binding).
> > > 
> > > ~Kyle
> > > -- 
> > > Science is what we can tell a computer. Art is everything else.
> > >                                                                -- Knuth
> > 
> > 
> > 
> > 
> > 
> 
> 


Attachment: signature.asc
Description: Digital signature