pathlib.PureWindowsPath.match() mishandles path anchors #101360
Labels
3.10
only security fixes
3.11
only security fixes
3.12
only security fixes
OS-windows
topic-pathlib
type-bug
An unexpected behavior, bug, or error
pathlib.PurePath.match()
doesn't usefnmatch()
to match path anchors, contrary to the documentation. Instead, it considers the drive and root of the pattern separately; if either (or both) is specified in the pattern, it must exactly match the corresponding drive/root in the path.This results in the following:
All of these results are wrong IMO.
Linked PRs
The text was updated successfully, but these errors were encountered: