Open apainintheneck opened 2 months ago
It seems like what Python does in fnmatch is to normalize paths by downcasing them and substituting "\"
for "/"
. The substitution would be simple enough to add here though I do wonder if downcasing is really necessary at all here since there is already a flag for case insensitive matching.
The weird thing is that it only seems to normalize windows paths when run on windows.
Ah, I see now that the main difference is that on Windows the backslash is a path separator component while on Unix systems it's just treated as a normal character (at least that goes for macOS). I'm not sure if this should be the responsibility of this library if there isn't a generic solution here.
Currently only Unix file paths are supported and it'd be nice to be able to match against everything.