extras/globbing.c
changeset 575 3bf69b30fe74
parent 573 01112353ffad
child 576 5da65f8e9a50
--- a/extras/globbing.c	Wed Jun 11 09:02:12 2003 +0000
+++ b/extras/globbing.c	Wed Jun 11 09:05:47 2003 +0000
@@ -39,7 +39,11 @@
         y = *wildptr;
         if (y == '*')
         {
-            wildptr++;
+            do
+            {
+                wildptr++;  /* skip multiple '*' in a row... */
+            } while (*wildptr == '*');
+
             y = (caseSensitive) ? *wildptr : (char) tolower(*wildptr);
 
             while (1)
@@ -74,8 +78,10 @@
             if (x != y)
                 return(0);
         } /* else */
+    } /* while */
 
-    } /* while */
+    while (*wildptr == '*')
+        wildptr++;
 
     return(*fnameptr == *wildptr);
 } /* matchesPattern */