bool mask_match(const char *string, const char *pattern, bool is_case_sensitive)
{
- if (strcmp(string,"..") == 0)
+ if (ISDOTDOT(string))
string = ".";
- if (strcmp(pattern,".") == 0)
+ if (ISDOT(pattern))
return False;
return ms_fnmatch(pattern, string, Protocol <= PROTOCOL_LANMAN2, is_case_sensitive) == 0;
bool mask_match_search(const char *string, const char *pattern, bool is_case_sensitive)
{
- if (strcmp(string,"..") == 0)
+ if (ISDOTDOT(string))
string = ".";
- if (strcmp(pattern,".") == 0)
+ if (ISDOT(pattern))
return False;
return ms_fnmatch(pattern, string, True, is_case_sensitive) == 0;