--- a/source/lib/ms_fnmatch.c
+++ b/source/lib/ms_fnmatch.c
@@ -153,6 +153,10 @@ int ms_fnmatch(const char *pattern, cons
int ret, count, i;
struct max_n *max_n = NULL;
+ if (strcmp(pattern, "*") == 0) {
+ return 0;
+ }
+
if (strcmp(string, "..") == 0) {
string = ".";
}