Commit 529912b6 authored by Rob Swindell's avatar Rob Swindell 💬
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
Pipeline #2939 passed with stage
in 9 minutes and 36 seconds
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment