]> diplodocus.org Git - nmh/blobdiff - uip/mhstoresbr.c
Fixed quoting of filename, expanded C-T parameter values, etc.,
[nmh] / uip / mhstoresbr.c
index 93d3e90259fc8e90bf2612bd6b2c0b233d320d42..7b1dbd519b5c3655eed7d734b5ed4b5ac94b6d0b 100644 (file)
@@ -562,7 +562,10 @@ store_content (CT ct, CT p)
            char *tmpfilenam, *folder;
 
            /* Store content in temporary file for now */
-           tmpfilenam = m_mktemp(invo_name, NULL, NULL);
+           if ((tmpfilenam = m_mktemp(invo_name, NULL, NULL)) == NULL) {
+               adios(NULL, "unable to create temporary file in %s",
+                     get_temp_dir());
+           }
            ct->c_storage = add (tmpfilenam, NULL);
 
            /* Get the folder name */
@@ -623,7 +626,7 @@ got_filename:
      */
     if (ct->c_folder && (!is_partial || last_partial)) {
        msgnum = output_content_folder (ct->c_folder, ct->c_storage);
-       unlink (ct->c_storage);
+       (void) m_unlink (ct->c_storage);
        if (msgnum == NOTOK)
            return NOTOK;
     }