]> git.pld-linux.org Git - packages/bash.git/blame - bash40-025
- up to 4.0.33
[packages/bash.git] / bash40-025
CommitLineData
387ec419
AM
1 BASH PATCH REPORT
2 =================
3
4Bash-Release: 4.0
5Patch-ID: bash40-025
6
7Bug-Reported-by: Matt Zyzik <matt.zyzik@nyu.edu>
8Bug-Reference-ID: <20090519011418.GA21431@ice.filescope.com>
9Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-05/msg00044.html
10
11Bug-Description:
12
13bash40-024 introduced a regression for constructs like **/*.cs; that
14expansion would no longer include matching files in the current directory.
15This patch undoes portions of bash40-024 and fixes the original problem
16in a different way.
17
18Patch:
19
20*** ../bash-4.0-patched/lib/glob/glob.c 2009-05-22 12:32:26.000000000 -0400
21--- lib/glob/glob.c 2009-05-22 12:35:55.000000000 -0400
22***************
23*** 666,672 ****
24 }
25
26! /* compat: if GX_ALLDIRS, add the passed directory also, but don't add an
27! empty directory name. */
28! if (add_current && (flags & GX_NULLDIR) == 0)
29 {
30 sdlen = strlen (dir);
31--- 666,673 ----
32 }
33
34! /* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty
35! directory name as a placeholder if GX_NULLDIR (in which case the passed
36! directory name is "."). */
37! if (add_current)
38 {
39 sdlen = strlen (dir);
40***************
41*** 680,684 ****
42 nextlink->next = lastlink;
43 lastlink = nextlink;
44! bcopy (dir, nextname, sdlen + 1);
45 ++count;
46 }
47--- 681,688 ----
48 nextlink->next = lastlink;
49 lastlink = nextlink;
50! if (flags & GX_NULLDIR)
51! nextname[0] = '\0';
52! else
53! bcopy (dir, nextname, sdlen + 1);
54 ++count;
55 }
56***************
57*** 1008,1016 ****
58 /* Just return what glob_vector () returns appended to the
59 directory name. */
60 dflags = flags & ~GX_MARKDIRS;
61 if (directory_len == 0)
62 dflags |= GX_NULLDIR;
63 if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
64! dflags |= GX_ALLDIRS|GX_ADDCURDIR;
65 temp_results = glob_vector (filename,
66 (directory_len == 0 ? "." : directory_name),
67--- 1012,1033 ----
68 /* Just return what glob_vector () returns appended to the
69 directory name. */
70+ /* If flags & GX_ALLDIRS, we're called recursively */
71 dflags = flags & ~GX_MARKDIRS;
72 if (directory_len == 0)
73 dflags |= GX_NULLDIR;
74 if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
75! {
76! dflags |= GX_ALLDIRS|GX_ADDCURDIR;
77! #if 0
78! /* If we want all directories (dflags & GX_ALLDIRS) and we're not
79! being called recursively as something like `echo **/*.o'
80! ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from
81! adding a null directory name to the front of the temp_results
82! array. We turn off ADDCURDIR if not called recursively and
83! dlen == 0 */
84! #endif
85! if (directory_len == 0 && (flags & GX_ALLDIRS) == 0)
86! dflags &= ~GX_ADDCURDIR;
87! }
88 temp_results = glob_vector (filename,
89 (directory_len == 0 ? "." : directory_name),
90*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
91--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
92***************
93*** 26,30 ****
94 looks for to find the patch level (for the sccs version string). */
95
96! #define PATCHLEVEL 24
97
98 #endif /* _PATCHLEVEL_H_ */
99--- 26,30 ----
100 looks for to find the patch level (for the sccs version string). */
101
102! #define PATCHLEVEL 25
103
104 #endif /* _PATCHLEVEL_H_ */
This page took 0.040507 seconds and 4 git commands to generate.