]> git.pld-linux.org Git - packages/links2.git/blob - links2-gzip_fallback.patch
- (re)added pl-update patch
[packages/links2.git] / links2-gzip_fallback.patch
1 --- links-2.7/file.c.orig       2013-06-23 19:03:40.928839125 +0200
2 +++ links-2.7/file.c    2013-06-23 19:40:15.742080351 +0200
3 @@ -233,11 +233,16 @@
4                 mem_free(name);
5                 setcstate(c, S_FILE_TYPE); abort_connection(c); return;
6         }
7 +opening:       
8         EINTRLOOP(h, open(cast_const_char name, O_RDONLY | O_NOCTTY));
9         if (h == -1) {
10                 int er = errno;
11                 ENULLLOOP(d, opendir(cast_const_char name));
12                 if (d) goto dir;
13 +               if (strncmp(name + strlen(name) - 3, ".gz", 3) != 0) {
14 +                       add_to_strn(&name, ".gz");
15 +                       goto opening;
16 +               } 
17                 mem_free(name);
18                 setcstate(c, get_error_from_errno(er));
19                 abort_connection(c);
This page took 0.032061 seconds and 3 git commands to generate.