]> granicus.if.org Git - neomutt/commitdiff
Avoid browsing the remote spoolfile by setting MUTT_SELECT_MULTI attach 400/head
authorPietro Cerutti <gahr@gahr.ch>
Sun, 5 Feb 2017 15:59:17 +0000 (15:59 +0000)
committerPietro Cerutti <gahr@gahr.ch>
Tue, 14 Feb 2017 15:36:12 +0000 (15:36 +0000)
Closes #336

browser.c
compose.c

index 1eb232408be1db529668ca9e87ada03c94dba644..8483b119d6b095f83bd10a8e84a3cfb9d6a4bbd3 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -79,7 +79,6 @@ typedef struct folder_t
 
 static char OldLastDir[_POSIX_PATH_MAX] = "";
 static char LastDir[_POSIX_PATH_MAX] = "";
-static char LastDirBackup[_POSIX_PATH_MAX] = "";
 
 /* Frees up the memory allocated for the local-global variables.  */
 static void destroy_state (struct browser_state *state)
@@ -1050,9 +1049,6 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
   
   memset (&state, 0, sizeof (struct browser_state));
 
-  if (!folder)
-    strfcpy (LastDirBackup, LastDir, sizeof (LastDirBackup));
-
 #ifdef USE_NNTP
   if (option (OPTNEWS))
   {
@@ -1133,9 +1129,9 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
   else
 #endif
   {
-    if (!folder)
+    if (!*LastDir)
       getcwd (LastDir, sizeof (LastDir));
-    else
+    if (folder)
     {
       /* Whether we use the tracking feature of the browser depends
        * on which sort method we chose to use. This variable is defined
@@ -2088,8 +2084,6 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
   
   bail:
   
-  if (!folder)
-    strfcpy (LastDir, LastDirBackup, sizeof (LastDir));
   if (GotoSwapper[0])
     GotoSwapper[0] = '\0';
 }
index 83eb6a47992e8565653da137693eace7edfdcc2f..3445f11d60ce6beed1acd713b35b63e9aae5d60b 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -823,7 +823,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
          files = NULL;
 
          if (_mutt_enter_fname (prompt, fname, sizeof (fname),
-                       &menu->redraw, 0, 1, &files, &numfiles, 0) == -1 ||
+                       &menu->redraw, 0, 1, &files, &numfiles, MUTT_SEL_MULTI) == -1 ||
              *fname == '\0')
            break;