]> git.pld-linux.org Git - packages/w3m.git/blob - w3m-gzip_fallback.patch
- release 2
[packages/w3m.git] / w3m-gzip_fallback.patch
1 --- w3m-0.3/file.c.old  Wed Jul  3 08:02:45 2002
2 +++ w3m-0.3/file.c      Wed Jul  3 08:28:01 2002
3 @@ -336,6 +336,13 @@
4      struct stat stbuf;
5  
6      uf->guess_type = NULL;
7 +    if (stat(path, &stbuf) == -1
8 +       && strncmp(path + strlen(path) - 3, ".gz", 3) != 0) {
9 +       char *tmp_path = (char *)malloc(sizeof(".gz") + strlen(path));
10 +       stpcpy(stpcpy(tmp_path, path), ".gz");
11 +       free(path);
12 +       path = tmp_path;
13 +    } 
14      if (path == NULL || *path == '\0' ||
15         stat(path, &stbuf) == -1 || NOT_REGULAR(stbuf.st_mode)) {
16         uf->stream = NULL;
This page took 0.106733 seconds and 3 git commands to generate.