Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.path.join() return wrong value in windows #75798

Closed
quangnt mannequin opened this issue Sep 28, 2017 · 2 comments
Closed

os.path.join() return wrong value in windows #75798

quangnt mannequin opened this issue Sep 28, 2017 · 2 comments
Labels
OS-windows type-bug An unexpected behavior, bug, or error

Comments

@quangnt
Copy link
Mannequin

quangnt mannequin commented Sep 28, 2017

BPO 31617
Nosy @pfmoore, @tjguk, @zware, @eryksun, @zooba, @quangnt

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2017-09-28.11:33:46.854>
created_at = <Date 2017-09-28.11:09:21.340>
labels = ['type-bug', 'invalid', 'OS-windows']
title = 'os.path.join() return wrong value in windows'
updated_at = <Date 2017-09-28.11:33:46.852>
user = 'https://github.com/quangnt'

bugs.python.org fields:

activity = <Date 2017-09-28.11:33:46.852>
actor = 'eryksun'
assignee = 'none'
closed = True
closed_date = <Date 2017-09-28.11:33:46.854>
closer = 'eryksun'
components = ['Windows']
creation = <Date 2017-09-28.11:09:21.340>
creator = 'triquang'
dependencies = []
files = []
hgrepos = []
issue_num = 31617
keywords = []
message_count = 2.0
messages = ['303216', '303223']
nosy_count = 6.0
nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'eryksun', 'steve.dower', 'triquang']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue31617'
versions = ['Python 2.7']

@quangnt
Copy link
Mannequin Author

quangnt mannequin commented Sep 28, 2017

In windows if we use os.path.join('C:\\Test\\UnitTest', '/Page') ==> It returns 'C:/Page' ==> It should be 'C:\\Test\\UnitTest/Page'.

@quangnt quangnt mannequin added the OS-windows label Sep 28, 2017
@eryksun
Copy link
Contributor

eryksun commented Sep 28, 2017

This is explained in the docs:

Join one or more path components intelligently.... If a 
component is an absolute path, all previous components are 
thrown away and joining continues from the absolute path 
component. On Windows, the drive letter is not reset when 
an absolute path component (e.g., r'\foo') is encountered.

@eryksun eryksun closed this as completed Sep 28, 2017
@eryksun eryksun added invalid type-bug An unexpected behavior, bug, or error labels Sep 28, 2017
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant