#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,
* 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;