diff options
Diffstat (limited to 'Src/glob.c')
-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 == '/') { |