aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-07-12 22:31:35 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-07-12 22:31:52 +0200
commit31d1cb7bc63d3d30f4875720d51f7dcda04d9d25 (patch)
treeed7022ed70b8ca8a73d97671781a39a68fc226f5
parent157542c3e7dd3eb89401bd3a8397693d4818efd8 (diff)
downloadmblaze-31d1cb7bc63d3d30f4875720d51f7dcda04d9d25.tar.gz
minc: use squeeze_slash
Closes #68.
-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;
}