From: Brendan Cully Date: Fri, 13 Apr 2007 21:14:07 +0000 (-0700) Subject: Strip / from tail of LastDir when copying from Maildir (closes #1885) X-Git-Tag: mutt-1-5-16-rel~22^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09a2e12c6f5dcc6fbf71650158e807dbf02c6c9a;p=mutt Strip / from tail of LastDir when copying from Maildir (closes #1885) --- diff --git a/ChangeLog b/ChangeLog index 4e17fdc2..2790e8c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2007-04-13 09:21 -0700 Brendan Cully (2c91477cac28) +2007-04-13 09:46 -0700 Brendan Cully (fad24cd7ba8f) + + * doc/Makefile.am: Allow elinks for building manual.txt (closes #2876) + + * sendlib.c: Even simpler header wrapping fix * sendlib.c: Fix header wrapping diff --git a/browser.c b/browser.c index c6fb2142..00ff95ba 100644 --- a/browser.c +++ b/browser.c @@ -620,7 +620,15 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num imap_browse (LastDir, &state); browser_sort (&state); } + else #endif + { + i = mutt_strlen (LastDir); + while (i && LastDir[--i] == '/') + LastDir[i] = '\0'; + if (!LastDir[0]) + getcwd (LastDir, sizeof (LastDir)); + } } *f = 0;