Eryk Sun <eryk...@gmail.com> added the comment:
This behavior is due to issue 37609, i.e. ntpath.splitdrive fails for "UNC" device paths. >>> ntpath.splitdrive('//?/UNC/server/share') ('//?/UNC', '/server/share') The result should be "//?/UNC/server/share". A path on the "UNC" device requires a share component, on which is mounted a local or remote filesystem directory. It's functionally part of the 'drive' path. Using just the root path or a server path on the "UNC" device is malformed in the context of a normal file API open. The former fails as ERROR_INVALID_NAME (123), and the latter fails as ERROR_BAD_PATHNAME (161). The incorrect splitdrive result in turn makes ntpath.split misbehave: >>> ntpath.split('//?/UNC/server/share') ('//?/UNC/server', 'share') >>> ntpath.split('//?/UNC/server') ('//?/UNC/', 'server') The correct result should be ('//?/UNC/server/share', ''). ---------- nosy: +eryksun type: crash -> behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41705> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com