X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/8c1b8e55ba6269af3f6be282eeb7b5a19516315f..6cc9e85e73ff6f6c67ae6e645d184bbf57ecc2f0:/sbr/m_draft.c?ds=sidebyside diff --git a/sbr/m_draft.c b/sbr/m_draft.c index d3e988ed..de5ac5cc 100644 --- a/sbr/m_draft.c +++ b/sbr/m_draft.c @@ -2,8 +2,6 @@ /* * 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. @@ -11,7 +9,6 @@ #include #include -#include char * @@ -32,7 +29,9 @@ m_draft (char *folder, char *msg, int use, int *isdf) } *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); @@ -40,7 +39,7 @@ m_draft (char *folder, char *msg, int use, int *isdf) 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); /*