(mail_pipe): Fix handling of cmd variable and command argument.
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -35,9 +35,9 @@ mail_pipe (int argc, char **argv) | ... | @@ -35,9 +35,9 @@ mail_pipe (int argc, char **argv) |
35 | off_t off = 0; | 35 | off_t off = 0; |
36 | size_t n = 0; | 36 | size_t n = 0; |
37 | 37 | ||
38 | if (argc > 1) | 38 | if (argc > 2) |
39 | cmd = argv[--argc]; | 39 | cmd = argv[--argc]; |
40 | else if (util_getenv (&cmd, "cmd", Mail_env_boolean, 1)) | 40 | else if (util_getenv (&cmd, "cmd", Mail_env_string, 1)) |
41 | return 1; | 41 | return 1; |
42 | 42 | ||
43 | if (msgset_parse (argc, argv, MSG_NODELETED|MSG_SILENT, &list)) | 43 | if (msgset_parse (argc, argv, MSG_NODELETED|MSG_SILENT, &list)) | ... | ... |
-
Please register or sign in to post a comment