X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=contrib%2Fnotmuch-deliver%2Fsrc%2Fmain.c;h=f7a4eaa6576bd1ec544d54c54b0e3d6e158388d0;hb=c39fd2a479cf28978236de0e9fc0304a8eda4e6e;hp=4e0a6bba395b0cd7a157e5132adefb1c474e79e8;hpb=5a74347025c5d7ef4874aaf8291d8bf763c0c159;p=notmuch diff --git a/contrib/notmuch-deliver/src/main.c b/contrib/notmuch-deliver/src/main.c index 4e0a6bba..f7a4eaa6 100644 --- a/contrib/notmuch-deliver/src/main.c +++ b/contrib/notmuch-deliver/src/main.c @@ -167,8 +167,7 @@ save_splice(int fdin, int fdout) do { written = splice(pfd[0], NULL, fdout, NULL, ret, 0); if (!written) { - g_critical("Splicing data to temporary file failed: %s", - g_strerror(errno)); + g_critical("Splicing data to temporary file failed: internal error"); close(pfd[0]); close(pfd[1]); return EX_IOERR; @@ -415,6 +414,11 @@ main(int argc, char **argv) } g_free(conf_path); + if ((argc - 1) > 1) { + g_critical("Won't deliver to %d folders", argc - 1); + return EX_USAGE; + } + if (argc > 1) { folder = g_strdup_printf("%s%s", opt_folder ? "." : "", argv[1]); maildir = g_build_filename(db_path, folder, NULL);