Always use full logic for processing glob segments. #5378
This is a workaround for issues found in #5333. I discovered while
This "fix" basically just omits the magic check for each segment
This is a workaround for issues found in #5333. I discovered while researching a fix for that bug that our `glob_helper` appears to be missing "else" logic for the segment processing that handles magic characters and unescaping. Put simply, if there's no magic in the segment it leaves it entirely unprocessed, allowing its contents to just get rolled into the next segment loop (which may or may not also have magic). However this leaves escapes in place. This "fix" basically just omits the magic check for each segment and allows full processing.
This narrows my fix to only fire for segments with magic chars (* and ? and the like) or backslashes in the presence of escaped mode (i.e. not FNM_NOESCAPE). This will slow down the processing of segments that contain only backslash escapes, but they were not processed properly before anyway. Segments without backslashes or magic characters are unaffected. Segments with backslashes and magic characters are unaffected.