]> git.pld-linux.org Git - packages/apache1.git/blob - apache1-configdir_skip_backups.patch
- -htpasswd: replaced usage with real desc; pl
[packages/apache1.git] / apache1-configdir_skip_backups.patch
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  
11 @@ -1309,13 +1310,21 @@
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, ".") &&
18                 strcmp(dir_entry->d_name, "..") &&
19                  (!ispatt ||
20 -                 !ap_fnmatch(pattern,dir_entry->d_name, FNM_PERIOD)) ) {
21 -               fnew = (fnames *) ap_push_array(candidates);
22 -               fnew->fname = ap_make_full_path(p, path, dir_entry->d_name);
23 +                 !ap_fnmatch(pattern,dir_entry->d_name, FNM_PERIOD)) &&
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);
30 +                                   fnew->fname = ap_make_full_path(p, path, dir_entry->d_name);
31 +                           }
32 +                   }
33             }
34         }
35         ap_pclosedir(p, dirp);
This page took 0.058592 seconds and 3 git commands to generate.