]> git.pld-linux.org Git - packages/links2.git/blame - links2-gzip_fallback.patch
- cleanups
[packages/links2.git] / links2-gzip_fallback.patch
CommitLineData
ddd32012
JB
1--- links-2.1pre28/file.c.orig 2006-11-28 17:23:14.000000000 +0100
2+++ links-2.1pre28/file.c 2007-04-18 14:49:21.420434281 +0200
1fba6328
JB
3@@ -235,9 +235,14 @@
4 mem_free(name);
5 setcstate(c, S_FILE_TYPE); abort_connection(c); return;
2486fcc9 6 }
7+opening:
8 if ((h = open(name, O_RDONLY | O_NOCTTY)) == -1) {
9 int er = errno;
10 if ((d = opendir(name))) goto dir;
11+ if (strncmp(name + strlen(name) - 3, ".gz", 3) != 0) {
12+ add_to_strn(&name, ".gz");
13+ goto opening;
14+ }
15 mem_free(name);
16 setcstate(c, -er); abort_connection(c); return;
17 }
This page took 0.060491 seconds and 4 git commands to generate.