X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhstoresbr.c;h=7c91184f9c26b0a3cb24d9525f0b970fe0e533b0;hp=bf5088e7ee4567b420a4385a84db6f88c608861b;hb=f480c03187724e54e5391ee61b810827da319a6c;hpb=d2f12554a254e814dcdafb3828fc0d9936154eef diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index bf5088e..7c91184 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. @@ -482,7 +480,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]; @@ -534,8 +532,8 @@ store_content (CT ct, CT p) * Get storage formatting string. * * 1) If we have storeproc defined, then use that - * 2) Else check for a mhn-store-/ entry - * 3) Else check for a mhn-store- entry + * 2) Else check for a mhstore-store-/ entry + * 3) Else check for a mhstore-store- entry * 4) Else if content is "message", use "+" (current folder) * 5) Else use string "%m%P.%s". */ @@ -560,17 +558,17 @@ 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 */ if (cp[1]) - folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF); + folder = pluspath (cp); else 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);