]> diplodocus.org Git - nmh/blobdiff - uip/mhstoresbr.c
Fixed extra and missing trailing commas in SEE ALSO sections of man pages.
[nmh] / uip / mhstoresbr.c
index a651d01a7b56087ed1d837f199a124046f0d679d..2bc78ceb948f43fdcfdc8e9baf23a305b5be5f06 100644 (file)
 #include <h/md5.h>
 #include <h/mts.h>
 #include <h/tws.h>
+#include <h/fmt_scan.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/utils.h>
+#include "mhshowsbr.h"
+#include "../sbr/m_maildir.h"
+#include "../sbr/m_mktemp.h"
 
 enum clobber_policy_t {
   NMH_CLOBBER_ALWAYS = 0,
@@ -947,7 +951,9 @@ parse_format_string (CT ct, char *cp, char *buffer, int buflen, char *dir)
      * appropriate directory.
      */
     if (*cp != '/' && *cp != '|' && *cp != '!') {
-       snprintf (bp, buflen, "%s/", dir[1] ? dir : "");
+        if (!strcmp(dir, "/"))
+            dir = ""; /* Don't start with "//". */
+       snprintf (bp, buflen, "%s/", dir);
        len = strlen (bp);
        bp += len;
        buflen -= len;