New submission from Roffild <[email protected]>:
Code:
import os
print(os.path.join("C:/123\\345", "\\", "folder///filename.bin"))
import pathlib
print(pathlib.PureWindowsPath("C:/123\\345", "\\", "folder///filename.bin"))
Result:
C:\folder///filename.bin
C:\folder\filename.bin
Expected result for Windows:
C:\123\345\folder\filename.bin
The number of slashes should be controlled by the library. Replacing / on \
should also depend on the OS.
----------
components: IO, Library (Lib), Windows
messages: 329776
nosy: Roffild, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Pathlib incorrectly merges strings.
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35223>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com