about summary refs log tree commit diff
path: root/Src/glob.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:14:01 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:14:01 +0000
commit850fb2e7f94b4e0e9fbf3538ad9e3c44c9fed74b (patch)
treea09f4376fe75073ed19fb5dd1de0fce4c898adb9 /Src/glob.c
parent7a40d6c258ad87d147ee5d6839e746c33ebc0ac7 (diff)
downloadzsh-850fb2e7f94b4e0e9fbf3538ad9e3c44c9fed74b.tar.gz
zsh-850fb2e7f94b4e0e9fbf3538ad9e3c44c9fed74b.tar.xz
zsh-850fb2e7f94b4e0e9fbf3538ad9e3c44c9fed74b.zip
zsh-3.1.5-pws-7 zsh-3.1.5-pws-7
Diffstat (limited to 'Src/glob.c')
-rw-r--r--Src/glob.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/glob.c b/Src/glob.c
index 7a3839576..5815f05a8 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1432,7 +1432,7 @@ glob(LinkList list, LinkNode np)
 			    }
 			}
 			break;
-		    case 'o':
+		    case 'f':
 			/* Match modes with chmod-spec. */
 			func = qualmodeflags;
 			data = qgetmodespec(&s);
@@ -1501,6 +1501,7 @@ glob(LinkList list, LinkNode np)
 			data = qgetnum(&s);
 			break;
 
+		    case 'o':
 		    case 'O':
 			{
 			    int t;
@@ -1524,7 +1525,7 @@ glob(LinkList list, LinkNode np)
 			    }
 			    gf_sorts |= t;
 			    gf_sortlist[gf_nsorts++] = t |
-				((sense & 1) ? GS_DESC : 0);
+				(((sense & 1) ^ (s[-1] == 'O')) ? GS_DESC : 0);
 			    s++;
 			    break;
 			}