]> granicus.if.org Git - mutt/commitdiff
patch-bac.chdir-20010523.1
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 23 May 2001 14:19:16 +0000 (14:19 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 23 May 2001 14:19:16 +0000 (14:19 +0000)
browser.c

index cb2ee24e72e1046452d096f5572a567a8494b237..50a8b25ca602018d0d719ff90cb860d5b8679712 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -907,9 +907,9 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
        if (!state.imap_browse)
 #endif
        {
-         /* add '/' at the end of the directory name */
+         /* add '/' at the end of the directory name if not already there */
          int len=mutt_strlen(LastDir);
-         if (sizeof (buf) > len)
+         if (LastDir[len-1] != '/' && sizeof (buf) > len)
            buf[len]='/';
        }