/*
* 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.
#include <h/signals.h>
#include <h/md5.h>
#include <errno.h>
-#include <setjmp.h>
#include <signal.h>
#include <h/mts.h>
#include <h/tws.h>
/* mhmisc.c */
int part_ok (CT, int);
int type_ok (CT, int);
-int make_intermediates (char *);
void flush_errors (void);
/* mhshowsbr.c */
* 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);
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];
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 */
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);