about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile2
-rw-r--r--minc.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index a6062ee..5f1d6a6 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -33,7 +33,7 @@ mshow : filter.o safe_u8putstr.o rfc2231.o pipeto.o
 mscan : pipeto.o
 msort : mystrverscmp.o
 mmime : slurp.o
-mlist : squeeze_slash.o
+minc mlist : squeeze_slash.o
 
 museragent: FRC
 	@printf '#!/bin/sh\nprintf "User-Agent: mblaze/%s (%s)\\n"\n' \
diff --git a/minc.c b/minc.c
index 7246763..21e6585 100644
--- a/minc.c
+++ b/minc.c
@@ -23,11 +23,13 @@ inc(char *dir)
 	char src[PATH_MAX];
 	char dst[PATH_MAX];
 
+	squeeze_slash(dir);
+
 	snprintf(src, sizeof src, "%s/new", dir);
 	fd = opendir(src);
 	if (!fd) {
 		fprintf(stderr, "minc: can't open maildir '%s': %s\n",
-		    dir, strerror(errno));
+		    src, strerror(errno));
 		status = 2;
 		return;
 	}