This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Eugene Bright
Recipients Eugene Bright
Date 2015-02-27.12:20:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425039632.15.0.00321481955838.issue23535@psf.upfronthosting.co.za>
In-reply-to
Content
Hello!

I found strange os.path.join() behavior on Windows.

It works fine in common case.
>>> os.path.join("C", "filename")
'C\\filename'

But if first argument is "C:" there are no backslashes added at all!

>>> os.path.join("C:", "filename")
'C:filename'

But I expect two inserted backslashes...

>>> sys.version
'3.4.1 |Anaconda 2.1.0 (64-bit)| (default, Sep 24 2014, 18:32:42) [MSC v.1600 64 bit (AMD64)]'

Is there a bug?
Thanks!
History
Date User Action Args
2015-02-27 12:20:32Eugene Brightsetrecipients: + Eugene Bright
2015-02-27 12:20:32Eugene Brightsetmessageid: <1425039632.15.0.00321481955838.issue23535@psf.upfronthosting.co.za>
2015-02-27 12:20:32Eugene Brightlinkissue23535 messages
2015-02-27 12:20:31Eugene Brightcreate