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

Re: [Mutt] #1885: browser doesn't check if the last char of $folder



#1885: browser doesn't check if the last char of $folder is '/' or not

Changes (by brendan):

  * milestone:  => 1.6

Old description:

> {{{
> Package: mutt
> Version: 1.5.6i
> Severity: wishlist
>
> -- Please type your report below this line
>
> I set $folder="~/Mail/" (not "~/Mail").
> I hit "c?" (just after invoking mutt).
> I saw ".." at the first entry of the browser menu.
> I hit <enter> key.
> Mutt did not enter the upper directory. (BUG!)
> I hit <enter> again.
> This time I went to the upper directory.
>
> This bug is that Mutt doesn't check the last character of $folder
> ("Maildir" in browser.c). And strrchr(LastDir+1,'/') tells
> (a pointer to) the last character of it when LastDir is ending
> with '/'. Even after nullifying the character, LastDir is not
> "/home/tamo" but "/home/tamo/Maildir".
>
> Two solutions:
> 1) document it. ("Don't put trailing slashes to directory variables!")
> 2) check it. (init.c or browser.c?)
>
> -- System Information
> System Version: FreeBSD mutt.no-ip.org 5.1-SECURITY FreeBSD 5.1-SECURITY
> #0: Tue Mar 16 03:16:16 GMT 2004
> root@xxxxxxxxxxxxxxxxxxxxxxx:/usr/obj/usr/src/sys/GENERIC  i386
>
> -- Build environment information
> deleted
>
> -- Mutt Version Information
>
> Mutt 1.5.6i (2004-02-01)
>
> System: FreeBSD 5.1-SECURITY (i386) [using slang 10405] [using libiconv
> 1.9] [using libidn 0.4.4 (compiled with 0.4.4)]
>
> patch-1.5.6.tt.ja.1
>
> --- Begin /home/tamo/.muttrc
>
> set mask='!(^\.[^.]|^cur$|^new$|^tmp$)'
> set folder="~/Mail/"
>
> --- End /home/tamo/.muttrc
>

>
> >How-To-Repeat:
>
> >Fix:
> }}}

New description:

 {{{
 Package: mutt
 Version: 1.5.6i
 Severity: wishlist

 -- Please type your report below this line

 I set $folder="~/Mail/" (not "~/Mail").
 I hit "c?" (just after invoking mutt).
 I saw ".." at the first entry of the browser menu.
 I hit <enter> key.
 Mutt did not enter the upper directory. (BUG!)
 I hit <enter> again.
 This time I went to the upper directory.

 This bug is that Mutt doesn't check the last character of $folder
 ("Maildir" in browser.c). And strrchr(LastDir+1,'/') tells
 (a pointer to) the last character of it when LastDir is ending
 with '/'. Even after nullifying the character, LastDir is not
 "/home/tamo" but "/home/tamo/Maildir".

 Two solutions:
 1) document it. ("Don't put trailing slashes to directory variables!")
 2) check it. (init.c or browser.c?)

 -- System Information
 System Version: FreeBSD mutt.no-ip.org 5.1-SECURITY FreeBSD 5.1-SECURITY
 #0: Tue Mar 16 03:16:16 GMT 2004
 root@xxxxxxxxxxxxxxxxxxxxxxx:/usr/obj/usr/src/sys/GENERIC  i386

 -- Build environment information
 deleted

 -- Mutt Version Information

 Mutt 1.5.6i (2004-02-01)

 System: FreeBSD 5.1-SECURITY (i386) [using slang 10405] [using libiconv
 1.9] [using libidn 0.4.4 (compiled with 0.4.4)]

 patch-1.5.6.tt.ja.1

 --- Begin /home/tamo/.muttrc

 set mask='!(^\.[^.]|^cur$|^new$|^tmp$)'
 set folder="~/Mail/"

 --- End /home/tamo/.muttrc



 >How-To-Repeat:

 >Fix:
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/1885#comment:2>