992
if (stat (buf, &st) == 0)
994
if (S_ISDIR (st.st_mode))
996
destroy_state (&state);
997
if (examine_directory (menu, &state, buf, prefix) == 0)
998
strfcpy (LastDir, buf, sizeof (LastDir));
995
/* in case dir is relative, make it relative to LastDir,
996
* not current working dir */
997
char tmp[_POSIX_PATH_MAX];
998
mutt_concat_path (tmp, LastDir, buf, sizeof (tmp));
999
strfcpy (buf, tmp, sizeof (buf));
1001
if (stat (buf, &st) == 0)
1003
if (S_ISDIR (st.st_mode))
1001
mutt_error _("Error scanning directory.");
1002
if (examine_directory (menu, &state, LastDir, prefix) == -1)
1005
destroy_state (&state);
1006
if (examine_directory (menu, &state, buf, prefix) == 0)
1007
strfcpy (LastDir, buf, sizeof (LastDir));
1004
mutt_menuDestroy (&menu);
1010
mutt_error _("Error scanning directory.");
1011
if (examine_directory (menu, &state, LastDir, prefix) == -1)
1013
mutt_menuDestroy (&menu);
1019
init_menu (&state, menu, title, sizeof (title), buffy);
1010
init_menu (&state, menu, title, sizeof (title), buffy);
1022
mutt_error (_("%s is not a directory."), buf);
1013
mutt_error (_("%s is not a directory."), buf);
1018
1028
MAYBE_REDRAW (menu->redraw);