diff options
Diffstat (limited to 'autoirpm.update-all.cc')
-rw-r--r-- | autoirpm.update-all.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autoirpm.update-all.cc b/autoirpm.update-all.cc index db2ee5a2..3d13899e 100644 --- a/autoirpm.update-all.cc +++ b/autoirpm.update-all.cc @@ -35,7 +35,7 @@ int main(int argc, char **argv) { for (int i = 3; i < argc; i++) { Header header; - FD_t fd = fdOpen(argv[i], O_RDONLY, 0); + FD_t fd = strcmp(argv[i], "-") == 0 ? fdDup(STDIN_FILENO) : fdOpen(argv[i], O_RDONLY, 0); if (fdFileno(fd) < 0) { fprintf(stderr, "%s: cannot open file %s\n", argv[0], argv[i]); exit(1); |