-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Line 692 in 264a011
| return bool(self.drive and self.root) |
Note that this check is wrong for incomplete UNC paths such as "//", "//spam", "//?/UNC/", and "//?/UNC/spam". Such paths lack a root and don't even have an implicit root. However, they're still absolute because they don't depend on the current working directory. I don't know how or whether you want to handle this edge case.
ntpath.isabs()gets this case right, but it's still wrong for rooted paths such as "/spam".
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error