02ffc66f55
unmodified, if no matches found. But our original code strips all '\' returning it. Rewrite the code to allow to reconstruct exact the original pattern with backslashes for this case. 2) Prevent to use truncated pattern if MAXPATHLEN exceeded, return GLOB_NOMATCH instead. 3) Fix few end loop conditions filling Char arrays with mbrtowc(), MB_CUR_MAX is unneeded in two places and condition is less by one in other place. 4) Prevent to use truncated filenames match if MAXPATHLEN exceeded, skip such directory entries. 5) Don't end *pathend with L'/' in glob3() if limit is reached, this change will be not visible since error is returned. 6) If error happens in (*readdirfunc)(), do the same GLOB_ABORTED processing as for g_opendir() as POSIX requires.