Despite rummaging in the manual and the code, I haven't been able to see 
a way to define a default directory for attachment saves that differs 
from the default directory for Mutt's temporary files.  I can hardcode 
the user's home directory to serve as the attachment default with the 
following nauseating kludge (this one's for single-attachment saves 
only, just to show the concept):

--- recvattach.c.orig   Mon Nov 27 08:12:58 2000
+++ recvattach.c        Thu Jan 25 08:54:00 2001
@@ -382,6 +382,12 @@
       || !buf[0])
     return -1;
 
+  if (*buf != '/' && strlen(buf) < sizeof(buf) - 2) {
+      int i;
+      for(i=strlen(buf); i>=0; --i) { *(buf+i+2) = *(buf+i); }
+      *(buf+1) = '/';
+      *buf = '~';
+  }
   mutt_expand_path (buf, sizeof (buf));
 
   is_message = (fp && 

but surely there's a better way???

-- 
| G r e g  L o u i s          | gpg public key:      |
|   http://www.bgl.nu/~glouis |   finger [EMAIL PROTECTED] |

PGP signature

Reply via email to