diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-08-24 19:20:54 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-08-24 19:20:54 +0200 |
commit | aea70b203d19d02079a1d6c0b07d06220bf811d2 (patch) | |
tree | 0178fc11fc15dc9ddaf2eca91b265ce62e2ed956 /src/filelist.c | |
parent | 9fcf25807ad1e9c0b32985e0a77a6de8098fe91f (diff) | |
download | feh-aea70b203d19d02079a1d6c0b07d06220bf811d2.zip |
--filelist: Support reading from /dev/stdin ("-" as shortcut)
Note that read_filelist used to check if its argument was an image (for people
accidentaly typing "feh -df *" instead of "feh -dF *"); this was removed
because it failed on /dev/stdin.
I might re-add it, but I'm not yet sure about the future of feh's automatic
filelist saving.
Diffstat (limited to 'src/filelist.c')
-rw-r--r-- | src/filelist.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/filelist.c b/src/filelist.c index 0373504..d83b8df 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -440,7 +440,7 @@ int feh_write_filelist(gib_list * list, char *filename) FILE *fp; gib_list *l; - if (!list || !filename) + if (!list || !filename || !strcmp(filename, "/dev/stdin")) return(0); errno = 0; @@ -467,19 +467,6 @@ gib_list *feh_read_filelist(char *filename) if (!filename) return(NULL); - /* try and load the given filelist as an image, cowardly refuse to - * overwrite an image with a filelist. (requested by user who did feh -df * - * when he meant feh -dF *, as it overwrote the first image with the - * filelist). - */ - if (feh_load_image_char(&im1, filename)) { - weprintf( - "The file you specified as a filelist to read - %s - appears to be an image. Ignoring it (this is a common mistake).\n", - filename); - opt.filelistfile = NULL; - return(NULL); - } - errno = 0; if ((fp = fopen(filename, "r")) == NULL) { /* return quietly, as it's okay to specify a filelist file that doesn't |