]> git.pld-linux.org Git - packages/apache.git/commitdiff
skip *~, *.rpm{new,save,orig} files in config dir
authorArtur Frysiak <artur@frysiak.net>
Mon, 14 May 2001 17:45:06 +0000 (17:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-configdir_skip_backups.patch -> 1.1

apache-configdir_skip_backups.patch [new file with mode: 0644]

diff --git a/apache-configdir_skip_backups.patch b/apache-configdir_skip_backups.patch
new file mode 100644 (file)
index 0000000..3419c2e
--- /dev/null
@@ -0,0 +1,33 @@
+--- 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;
++      size_t slen;
+       array_header *candidates = NULL;
+       fnames *fnew;
+@@ -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);
This page took 0.089711 seconds and 4 git commands to generate.