X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhstoresbr.c;h=ed1b8223e5405550756ec8c4aee09b935717e08c;hb=015e83362f21a061bf268b878693d72309c21e55;hp=23b4ef2ed2059ca95c913eee9eb82ca1b14be5ca;hpb=0569d6d1631dc90d4f2f2df6bdd0599c7ecc7814;p=mmh diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 23b4ef2..ed1b822 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -2,8 +2,6 @@ /* * mhstoresbr.c -- routines to save/store the contents of MIME messages * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -14,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -51,7 +48,6 @@ typedef int (*qsort_comp) (const void *, const void *); /* mhmisc.c */ int part_ok (CT, int); int type_ok (CT, int); -int make_intermediates (char *); void flush_errors (void); /* mhshowsbr.c */ @@ -96,9 +92,7 @@ store_all_messages (CT *cts) * Check for the directory in which to * store any contents. */ - if (autosw) - dir = getcpy (cwd); - else if ((cp = context_find (nmhstorage)) && *cp) + if ((cp = context_find (nmhstorage)) && *cp) dir = getcpy (cp); else dir = getcpy (cwd); @@ -482,7 +476,7 @@ ct_compar (CT *a, CT *b) static int store_content (CT ct, CT p) { - int appending = 0, msgnum; + int appending = 0, msgnum = 0; int is_partial = 0, first_partial = 0; int last_partial = 0; char *cp, buffer[BUFSIZ]; @@ -560,7 +554,7 @@ store_content (CT ct, CT p) char *tmpfilenam, *folder; /* Store content in temporary file for now */ - tmpfilenam = m_scratch ("", invo_name); + tmpfilenam = m_mktemp(invo_name, NULL, NULL); ct->c_storage = add (tmpfilenam, NULL); /* Get the folder name */ @@ -570,7 +564,7 @@ store_content (CT ct, CT p) folder = getfolder (1); /* Check if folder exists */ - create_folder(folder, 0, exit); + create_folder(m_mailpath(folder), 0, exit); /* Record the folder name */ ct->c_folder = add (folder, NULL);