]> git.pld-linux.org Git - packages/apache1.git/blob - apache1-configdir_skip_backups.patch
- update to 1.3.39
[packages/apache1.git] / apache1-configdir_skip_backups.patch
1 --- apache_1.3.35/src/main/http_config.c~       2006-05-03 01:17:59.162162254 +0300
2 +++ apache_1.3.35/src/main/http_config.c        2006-05-03 01:17:16.131203177 +0300
3 @@ -1345,6 +1345,7 @@
4         fnames *fnew;
5         char *path = ap_pstrdup(p,fname);
6         char *pattern = NULL;
7 +       size_t slen;
8  
9          if(ispatt && (pattern = strrchr(path, '/')) != NULL) {
10              *pattern++ = '\0';
11 @@ -1390,13 +1391,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.026697 seconds and 3 git commands to generate.