From: TAKAHASHI Tamotsu Date: Wed, 14 Jul 2004 05:45:18 +0000 (+0000) Subject: Fix Debian#237426. (Experimental.) X-Git-Tag: mutt-1-5-15-rel~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c33680c81a66d838d2b2d4f2b84cd18d1b63a9e;p=mutt Fix Debian#237426. (Experimental.) --- diff --git a/browser.c b/browser.c index f60295b9..4dc4cc71 100644 --- a/browser.c +++ b/browser.c @@ -944,21 +944,21 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num { if (S_ISDIR (st.st_mode)) { - strfcpy (LastDir, buf, sizeof (LastDir)); destroy_state (&state); - if (examine_directory (menu, &state, LastDir, prefix) == 0) - { - menu->current = 0; - menu->top = 0; - init_menu (&state, menu, title, sizeof (title), buffy); - } + if (examine_directory (menu, &state, buf, prefix) == 0) + strfcpy (LastDir, buf, sizeof (LastDir)); else { mutt_error _("Error scanning directory."); - destroy_state (&state); - mutt_menuDestroy (&menu); - goto bail; + if (examine_directory (menu, &state, LastDir, prefix) == -1) + { + mutt_menuDestroy (&menu); + goto bail; + } } + menu->current = 0; + menu->top = 0; + init_menu (&state, menu, title, sizeof (title), buffy); } else mutt_error (_("%s is not a directory."), buf);