bpo-33660: Fix PosixPath to resolve a relative path on root by corona10 · Pull Request #7666 · python/cpython
corona10
changed the title
bpo-33660: Fix PosixPath to resolve a relative path on root
[WIP} bpo-33660: Fix PosixPath to resolve a relative path on root
corona10
changed the title
[WIP} bpo-33660: Fix PosixPath to resolve a relative path on root
bpo-33660: Fix PosixPath to resolve a relative path on root
@pitrou Please take a look :)
There are 2 options to fix this bug.
if path == sep: newpath = sep + name else: newpath = path + sep + name
or
if path == '/': newpath = sep + name else: newpath = path + sep + name
I choose the first one.
@corona10 Can you clarify why this was closed? Perhaps in the issue?
ambv
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters