]> git.pld-linux.org Git - packages/elinks.git/commitdiff
- gzip fallback
authorjuandon <witekfl@pld-linux.org>
Sun, 29 Sep 2002 19:24:29 +0000 (19:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    elinks-gzip_fallback.patch -> 1.1

elinks-gzip_fallback.patch [new file with mode: 0644]

diff --git a/elinks-gzip_fallback.patch b/elinks-gzip_fallback.patch
new file mode 100644 (file)
index 0000000..f4b19c7
--- /dev/null
@@ -0,0 +1,32 @@
+--- elinks-0.4pre17/src/protocol/file.c.orig   Sun Sep 29 19:22:23 2002
++++ elinks-0.4pre17/src/protocol/file.c        Sun Sep 29 19:31:32 2002
+@@ -353,14 +353,23 @@
+       h = open(name, O_RDONLY | O_NOCTTY);
+       if (h == -1) {
+-              saved_errno = errno;
++              unsigned char *new_name = init_str();
++              unsigned int new_len = 0;
++              add_to_str(&new_name, &new_len, name);
++              add_to_str(&new_name, &new_len, ".gz");
++              mem_free(name);
++              name = new_name;
++              h = open(name, O_RDONLY | O_NOCTTY);
++              if (h == -1) {
++                      saved_errno = errno;
+-              d = opendir(name);
+-              if (d) goto dir;
++                      d = opendir(name);
++                      if (d) goto dir;
+-              mem_free(name);
+-              abort_conn_with_state(c, -saved_errno);
+-              return;
++                      mem_free(name);
++                      abort_conn_with_state(c, -saved_errno);
++                      return;
++              }
+       }
+       set_bin(h);
This page took 0.133045 seconds and 4 git commands to generate.