You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, what's happening there is that it's reading the c:\ directory, and finding ['Program Files'], but testing against the progra~1 doesn't find anything.
What it really should do, which would also have the benefit of being faster in the vast majority of cases, is concatenate all non-magic string portions of the pattern, and just readdir at that first location. Then it'd call readdir on c:\progra~1 in this case, which does return the results expected. Of course, it means you'll get results like c:\progra~1\Whatever, but I assume that's probably fine, yes?
OH, heh, there's code to do this already, but it's breaking out if we haven't seen the path yet, and it is anything other than '..'. That looks like a mistake.
Didn't impact perf to any significant degree that I could determine from the benchmarks, even trying to hand it a benchmark that would benefit as much as possible from the shortcut. I guess readdir is just pretty fast 😅
Pattern
c:\progra~1\*.ext
withwindowsPathsNoEscape: true
should works the same as "c:\program files\*.ext"The text was updated successfully, but these errors were encountered: