Skip to content
Snippets Groups Projects
Commit 529912b6 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Only filename portion of pattern for globi() shall be case-insensitive

Windows doesn't allow multiple directories of the same name only differing in case, so don't on *nix either.
parent ce01d8a7
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2939 passed
......@@ -307,7 +307,7 @@ void globfree(glob_t* glob)
#else /* __unix__ */
// Case-insensitive version of glob()
// Filename-case-insensitive version of glob()
int globi(const char *p, int flags,
int (*errfunc) (const char *epath, int eerrno),
glob_t *g)
......@@ -316,6 +316,7 @@ int globi(const char *p, int flags,
int len = 0;
if(p != NULL) {
p = getfname(p);
while(*p != '\0' && len < MAX_PATH) {
if(IS_ALPHA(*p))
len += sprintf(pattern + len, "[%c%c]", toupper(*p), tolower(*p));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment