summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2012-08-27 20:58:06 +0200
committerDaniel Friesel <derf@finalrewind.org>2012-08-27 20:58:06 +0200
commitdfe65efcc0a347f8ae5e710039331b5504e78880 (patch)
treebb1d95682a4384a8a97f475566dddc5a9afa9e98 /src
parent22485fb7f08950379f2fa498bd081c1623ea8bbd (diff)
fix --filelist trying to load .txt and similar with magick. (closes #96)
Diffstat (limited to 'src')
-rw-r--r--src/filelist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/filelist.c b/src/filelist.c
index 34df6cf..920a5ef 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -456,6 +456,7 @@ gib_list *feh_read_filelist(char *filename)
char s[1024], s1[1024];
Imlib_Image tmp_im;
struct stat st;
+ signed short tmp_magick_timeout;
if (!filename)
return(NULL);
@@ -463,6 +464,8 @@ gib_list *feh_read_filelist(char *filename)
/*
* feh_load_image will fail horribly if filename is not seekable
*/
+ tmp_magick_timeout = opt.magick_timeout;
+ opt.magick_timeout = -1;
if (!stat(filename, &st) && S_ISREG(st.st_mode) &&
feh_load_image_char(&tmp_im, filename)) {
weprintf("Filelist file %s is an image, refusing to use it.\n"
@@ -470,6 +473,7 @@ gib_list *feh_read_filelist(char *filename)
opt.filelistfile = NULL;
return NULL;
}
+ opt.magick_timeout = tmp_magick_timeout;
errno = 0;
if ((fp = fopen(filename, "r")) == NULL) {