1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
$NetBSD: patch-ad,v 1.1.1.1 2011/01/23 14:31:56 wiz Exp $
--- src/find.c.orig 2005-05-27 14:19:18.000000000 +0000
+++ src/find.c
@@ -606,18 +606,7 @@ do_search (struct Dlg_head *h)
stop_idle (h);
return 0;
}
- if (find_ignore_dirs){
- int found;
- char *temp_dir = g_strconcat (":", tmp, ":", (char *) NULL);
-
- found = strstr (find_ignore_dirs, temp_dir) != 0;
- g_free (temp_dir);
- if (found)
- g_free (tmp);
- else
- break;
- } else
- break;
+ break;
}
g_free (directory);
@@ -652,14 +641,30 @@ do_search (struct Dlg_head *h)
return 1;
}
- if (subdirs_left && directory) { /* Can directory be NULL ? */
- char *tmp_name = concat_dir_and_file (directory, dp->d_name);
- if (!mc_lstat (tmp_name, &tmp_stat)
- && S_ISDIR (tmp_stat.st_mode)) {
- push_directory (tmp_name);
- subdirs_left--;
+ if (directory) { /* Can directory be NULL ? */
+ char *tmp_name;
+ if (find_ignore_dirs){
+ int found;
+
+ tmp_name = g_strconcat (":", dp->d_name, ":", (char *) NULL);
+
+ found = strstr (find_ignore_dirs, tmp_name) != 0;
+ g_free (tmp_name);
+ if (found) {
+ dp = mc_readdir (dirp);
+ return 1;
+ }
+ }
+
+ if (subdirs_left) {
+ tmp_name = concat_dir_and_file (directory, dp->d_name);
+ if (!mc_lstat (tmp_name, &tmp_stat)
+ && S_ISDIR (tmp_stat.st_mode)) {
+ push_directory (tmp_name);
+ subdirs_left--;
+ }
+ g_free (tmp_name);
}
- g_free (tmp_name);
}
if (regexp_match (find_pattern, dp->d_name, match_file)){
|