]> git.pld-linux.org Git - packages/apache.git/blame - apache-configdir_skip_backups.patch
- updated for 1.3.32
[packages/apache.git] / apache-configdir_skip_backups.patch
CommitLineData
f1800b13
AF
1--- apache_1.3.17/src/main/http_config.c.wiget Thu May 10 14:41:08 2001
2+++ apache_1.3.17/src/main/http_config.c Thu May 10 15:42:12 2001
3@@ -1287,6 +1287,7 @@
4 DIR *dirp;
5 struct DIR_TYPE *dir_entry;
6 int current;
7+ size_t slen;
8 array_header *candidates = NULL;
9 fnames *fnew;
10
255ef869 11@@ -1309,13 +1310,21 @@
f1800b13
AF
12 }
13 candidates = ap_make_array(p, 1, sizeof(fnames));
14 while ((dir_entry = readdir(dirp)) != NULL) {
15+ slen = strlen(dir_entry->d_name);
16 /* strip out '.' and '..' */
17 if (strcmp(dir_entry->d_name, ".") &&
255ef869
JB
18 strcmp(dir_entry->d_name, "..") &&
19 (!ispatt ||
20- !ap_fnmatch(pattern,dir_entry->d_name, FNM_PERIOD)) ) {
f1800b13 21- fnew = (fnames *) ap_push_array(candidates);
255ef869
JB
22- fnew->fname = ap_make_full_path(p, path, dir_entry->d_name);
23+ !ap_fnmatch(pattern,dir_entry->d_name, FNM_PERIOD)) &&
f1800b13
AF
24+ (dir_entry->d_name)[slen-1] != '~') {
25+ if (slen < 8 || strcmp((dir_entry->d_name + slen - 7), ".rpmnew")) {
26+ if (slen < 9 ||
27+ strcmp((dir_entry->d_name + slen - 8), ".rpmorig") &&
28+ strcmp((dir_entry->d_name + slen - 8), ".rpmsave")) {
29+ fnew = (fnames *) ap_push_array(candidates);
255ef869 30+ fnew->fname = ap_make_full_path(p, path, dir_entry->d_name);
f1800b13
AF
31+ }
32+ }
33 }
34 }
35 ap_pclosedir(p, dirp);
This page took 0.034294 seconds and 4 git commands to generate.