From 69378db3c53cea12d8c5f20380de5017e4e72611 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 4 Jun 2014 22:47:20 -0700 Subject: 32708: glob qualifier (Y) implies (oN) plus incidental patch to avoid adding a meaningless bitvalue to sort-order flags --- Src/glob.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Src/glob.c') diff --git a/Src/glob.c b/Src/glob.c index c74a56053..c6cb3d2fc 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -1619,9 +1619,10 @@ zglob(LinkList list, LinkNode np, int nountok) restore_globstate(saved); return; } + if ((sense & 2) && + (t & (GS_SIZE|GS_ATIME|GS_MTIME|GS_CTIME|GS_LINKS))) + t <<= GS_SHIFT; /* HERE: GS_EXEC? */ if (t != GS_EXEC) { - if ((sense & 2) && !(t & (GS_NAME|GS_DEPTH))) - t <<= GS_SHIFT; /* HERE: GS_EXEC? */ if (gf_sorts & t) { zerr("doubled sort specifier"); restore_globstate(saved); @@ -1779,7 +1780,7 @@ zglob(LinkList list, LinkNode np, int nountok) return; } if (!gf_nsorts) { - gf_sortlist[0].tp = gf_sorts = GS_NAME; + gf_sortlist[0].tp = gf_sorts = (shortcircuit ? GS_NONE : GS_NAME); gf_nsorts = 1; } /* Initialise receptacle for matched files, * -- cgit 1.4.1