about summary refs log tree commit diff
path: root/Src/glob.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-10-22 09:27:03 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-10-22 09:27:03 +0000
commit756cfc08e22119925431acc1cc66602acce42632 (patch)
tree2bd7542351aa2f0e779ac60d48116af440205d28 /Src/glob.c
parent526f86ec15e12405dfda016cf2bf59dab093d8fa (diff)
downloadzsh-756cfc08e22119925431acc1cc66602acce42632.tar.gz
zsh-756cfc08e22119925431acc1cc66602acce42632.tar.xz
zsh-756cfc08e22119925431acc1cc66602acce42632.zip
24006: (F) glob qualifier should unmetafy
Diffstat (limited to 'Src/glob.c')
-rw-r--r--Src/glob.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Src/glob.c b/Src/glob.c
index d95eced35..b703926a9 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -326,7 +326,8 @@ insert(char *s, int checked)
 	    /* Reject the file if the function returned zero *
 	     * and the sense was positive (sense&1 == 0), or *
 	     * vice versa.                                   */
-	    if ((!((qn->func) (news, bp, qn->data, qn->sdata)) ^ qn->sense) & 1) {
+	    if ((!((qn->func) (news, bp, qn->data, qn->sdata))
+		 ^ qn->sense) & 1) {
 		/* Try next alternative, or return if there are no more */
 		if (!(qo = qo->or)) {
 		    unqueue_signals();
@@ -3254,6 +3255,8 @@ qualnonemptydir(char *name, struct stat *buf, UNUSED(off_t days), UNUSED(char *s
 {
     DIR *dirh;
     struct dirent *de;
+    int unamelen;
+    char *uname = unmetafy(dupstring(name), &unamelen);
 
     if (!S_ISDIR(buf->st_mode))
 	return 0;
@@ -3261,7 +3264,7 @@ qualnonemptydir(char *name, struct stat *buf, UNUSED(off_t days), UNUSED(char *s
     if (buf->st_nlink > 2)
 	return 1;
 
-    if (!(dirh = opendir(name)))
+    if (!(dirh = opendir(uname)))
 	return 0;
 
     while ((de = readdir(dirh))) {