]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache-configdir_skip_backups.patch
- http://allafrica.com/tools/apache/mod_proxy/mod_proxy-khk_1.3.26-patch.diff
[packages/apache.git] / apache-configdir_skip_backups.patch
index 3419c2e22911ccdfff46fc948ac12b552685cd5e..ecc4084c9c5885e2b9a6c3ca03a4a1cf5781eec8 100644 (file)
@@ -1,33 +1,26 @@
---- apache_1.3.17/src/main/http_config.c.wiget Thu May 10 14:41:08 2001
-+++ apache_1.3.17/src/main/http_config.c       Thu May 10 15:42:12 2001
-@@ -1287,6 +1287,7 @@
-       DIR *dirp;
-       struct DIR_TYPE *dir_entry;
-       int current;
+diff -Nru httpd-2.0.48.orig/server/config.c httpd-2.0.48/server/config.c
+--- httpd-2.0.48.orig/server/config.c  2003-10-14 05:43:18.000000000 +0200
++++ httpd-2.0.48/server/config.c       2003-10-28 10:09:44.618490512 +0100
+@@ -1458,6 +1458,7 @@
+         apr_dir_t *dirp;
+         apr_finfo_t dirent;
+         int current;
 +      size_t slen;
-       array_header *candidates = NULL;
-       fnames *fnew;
+         apr_array_header_t *candidates = NULL;
+         fnames *fnew;
+         apr_status_t rv;
+@@ -1478,8 +1479,14 @@
  
-@@ -1309,11 +1310,19 @@
-       }
-       candidates = ap_make_array(p, 1, sizeof(fnames));
-       while ((dir_entry = readdir(dirp)) != NULL) {
-+          slen = strlen(dir_entry->d_name);
-           /* strip out '.' and '..' */
-           if (strcmp(dir_entry->d_name, ".") &&
--              strcmp(dir_entry->d_name, "..")) {
--              fnew = (fnames *) ap_push_array(candidates);
--              fnew->fname = ap_make_full_path(p, fname, dir_entry->d_name);
-+              strcmp(dir_entry->d_name, "..") &&
-+              (dir_entry->d_name)[slen-1] != '~') {
-+                  if (slen < 8 || strcmp((dir_entry->d_name + slen - 7), ".rpmnew")) {
-+                          if (slen < 9 || 
-+                              strcmp((dir_entry->d_name + slen - 8), ".rpmorig") && 
-+                              strcmp((dir_entry->d_name + slen - 8), ".rpmsave")) {
-+                                  fnew = (fnames *) ap_push_array(candidates);
-+                                  fnew->fname = ap_make_full_path(p, fname, dir_entry->d_name);
-+                          }
-+                  }
-           }
-       }
-       ap_pclosedir(p, dirp);
+         candidates = apr_array_make(p, 1, sizeof(fnames));
+         while (apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp) == APR_SUCCESS) {
++          slen = strlen(dirent.name);
+             /* strip out '.' and '..' */
+             if (strcmp(dirent.name, ".")
++              && (dirent.name)[slen-1] != '~'
++              && (dirent.name)[0] != '.'
++              && (slen < 8 || strcmp((dirent.name + slen - 7), ".rpmnew"))
++              && (slen < 9 || ( strcmp((dirent.name + slen - 8), ".rpmorig")
++                              && strcmp((dirent.name + slen - 8), ".rpmsave")))
+                 && strcmp(dirent.name, "..")) {
+                 fnew = (fnames *) apr_array_push(candidates);
+                 fnew->fname = ap_make_full_path(p, path, dirent.name);
This page took 0.044501 seconds and 4 git commands to generate.