diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/glob.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 5c6e6c332..f570d44e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-04-03 Barton E. Schaefer <schaefer@zsh.org> + + * 34837: Src/glob.c: avoid loss of original file path when applying + colon-modifiers in glob qualifiers, that path is still needed for + later stat() when sorting. + 2015-04-03 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> * 34840: Doc/Zsh/prompt.yo: minor format fixes diff --git a/Src/glob.c b/Src/glob.c index 33facde2b..ad29223c9 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -386,8 +386,8 @@ insert(char *s, int checked) while (!inserts || (news = dupstring(*inserts++))) { if (colonmod) { /* Handle the remainder of the qualifier: e.g. (:r:s/foo/bar/). */ - s = colonmod; - modify(&news, &s); + char *mod = colonmod; + modify(&news, &mod); } if (!statted && (gf_sorts & GS_NORMAL)) { statfullpath(s, &buf, 1); |