Commit b3f65f77 b3f65f770a632e6de16d9f79ccdff3fd38efb3f5 by Sergey Poznyakoff

(mail_pipe): Fix handling of cmd variable and command argument.

1 parent ca1d948c
...@@ -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))
......