os.path.join does not work correctly
Open
Nobody has claimed this yet.
docs
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 558
Description
Bug report
This simple script gives as a result g:\\2020 and not as expected g:\\fotos\\2020. It seems that the '\\' in front of 2020 is interpreted as '..\\', because without it the output is as expected.
import os
os.path.join('g:\\fotos', '\\2020')
Your environment
Windows 10 64 bit
python 3.10.9 (and 3.7)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the supplied os.path.join example on Windows 10 with Python 3.10 and 3.7. Start by checking the os.path.join documentation and the Windows path-handling implementation or tests; determine whether the result matches documented semantics. Done means confirming a defect with a focused regression test, or documenting why the reported result is expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100