diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-09-25 19:12:34 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-09-25 19:12:34 +0100 |
commit | 691a7e4b3d106bbc899bacbce20d1be9865b6598 (patch) | |
tree | 6537b8de9c8714f44505eab46b152d792ca2b06c /Src | |
parent | d9a059eb3af9f538d84e63aabe90e5321971dc07 (diff) | |
download | zsh-691a7e4b3d106bbc899bacbce20d1be9865b6598.tar.gz zsh-691a7e4b3d106bbc899bacbce20d1be9865b6598.tar.xz zsh-691a7e4b3d106bbc899bacbce20d1be9865b6598.zip |
users/19143: fix depth glob search with trailing slashes
Diffstat (limited to 'Src')
-rw-r--r-- | Src/glob.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/glob.c b/Src/glob.c index c24bfec93..ca7bc4410 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -900,6 +900,9 @@ gmatchcmp(Gmatch a, Gmatch b) /* Count slashes. Trailing slashes don't count. */ while (*aptr && *aptr == *bptr) aptr++, bptr++; + /* Like I just said... */ + if ((!*aptr || !*bptr) && aptr > a->name && aptr[-1] == '/') + aptr--, bptr--; if (*aptr) for (; aptr[1]; aptr++) if (*aptr == '/') { |