1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

34837: avoid loss of original file path when applying colon-modifiers in glob qualifiers

This commit is contained in:
Barton E. Schaefer 2015-04-03 09:55:11 -07:00
parent f5e7c4c839
commit 1fa68938dc
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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);