Skip to content

bpo-33660: Fix PosixPath to resolve a relative path on root#7666

Closed
corona10 wants to merge 1 commit into
python:masterfrom
corona10:bpo-33660
Closed

bpo-33660: Fix PosixPath to resolve a relative path on root#7666
corona10 wants to merge 1 commit into
python:masterfrom
corona10:bpo-33660

Conversation

@corona10

@corona10 corona10 commented Jun 12, 2018

Copy link
Copy Markdown
Member

https://bugs.python.org/issue33660

Needs backport to 3.7 3.6

@corona10 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 Jun 12, 2018
@corona10 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 Jun 12, 2018
@corona10

Copy link
Copy Markdown
Member Author

@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

corona10 commented Jul 5, 2018

Copy link
Copy Markdown
Member Author

@serhiy-storchaka

Can I get a review from anyone who related with this module?

@corona10 corona10 closed this Nov 20, 2019
@corona10
corona10 deleted the bpo-33660 branch November 20, 2019 18:18
@mbarkhau

Copy link
Copy Markdown
Contributor

@corona10 Can you clarify why this was closed? Perhaps in the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants