/*
* m_draft.c -- construct the name of a draft message
*
- * $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/mh.h>
-#include <errno.h>
+#include <h/utils.h>
char *
{
register char *cp;
register struct msgs *mp;
- struct stat st;
static char buffer[BUFSIZ];
if (*isdf == -1 || folder == NULL || *folder == '\0') {
}
*isdf = 1;
- chdir (m_maildir (""));
+ if (chdir (m_maildir ("")) < 0) {
+ advise (m_maildir (""), "chdir");
+ }
strncpy (buffer, m_maildir (folder), sizeof(buffer));
create_folder (buffer, 0, done);
if (chdir (buffer) == -1)
adios (buffer, "unable to change directory to");
- if (!(mp = folder_read (folder)))
+ if (!(mp = folder_read (folder, 1)))
adios (NULL, "unable to read folder %s", folder);
/*