From 1d1c999a51db52739483f7137104b7e8bedb83fa Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 18 Feb 2016 19:57:28 +0100 Subject: filelist: Don't try to fopen() stdin (it's a stream, not a file) --- src/filelist.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/filelist.c b/src/filelist.c index eaef54b..9391ba0 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -545,7 +545,13 @@ gib_list *feh_read_filelist(char *filename) opt.magick_timeout = tmp_magick_timeout; errno = 0; - if ((fp = fopen(filename, "r")) == NULL) { + + if (!strcmp(filename, "/dev/stdin")) + fp = stdin; + else + fp = fopen(filename, "r"); + + if (fp == NULL) { /* return quietly, as it's okay to specify a filelist file that doesn't exist. In that case we create it on exit. */ return(NULL); -- cgit v1.2.3