Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
ntpath.join() incorrectly inserts an additional slash when joining an argument onto an incomplete UNC drive with a trailing slash:
>>>importntpath>>>ntpath.join('\\\\server\\share\\foo\\','bar')'\\\\server\\share\\foo\\bar'# ok>>>ntpath.join('\\\\server\\share\\','foo')'\\\\server\\share\\foo'# ok>>>ntpath.join('\\\\server\\','share')'\\\\server\\\\share'# wrong!>>>ntpath.join('\\\\','server')'\\\\\\server'# wrong!
Before005e694 (3.12), the last test case succeeds becausesplitdrive() doesn't identify'\\\\' as a UNC drive. But the third test case is reproducible going back to 3.11 and 3.10.