*sum: support - when using -c
Signed-off-by: Mattias Andrée <maandree@kth.se>
This commit is contained in:
parent
75611997f9
commit
44a6d65832
|
@ -89,12 +89,15 @@ cryptcheck(int argc, char *argv[], struct crypt_ops *ops, uint8_t *md, size_t sz
|
|||
mdchecklist(stdin, ops, md, sz, &formatsucks, &noread, &nonmatch);
|
||||
} else {
|
||||
for (; *argv; argc--, argv++) {
|
||||
if (!(fp = fopen(*argv, "r"))) {
|
||||
if ((*argv)[0] == '-' && !(*argv)[1]) {
|
||||
fp = stdin;
|
||||
} else if (!(fp = fopen(*argv, "r"))) {
|
||||
weprintf("fopen %s:", *argv);
|
||||
ret = 1;
|
||||
continue;
|
||||
}
|
||||
mdchecklist(fp, ops, md, sz, &formatsucks, &noread, &nonmatch);
|
||||
if (fp != stdin)
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user