Author pekka.klarck
Recipients BreamoreBoy, georg.brandl, jpe, ocean-city, pekka.klarck
Date 2012-12-05.14:58:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354719522.15.0.0579197901119.issue1209447@psf.upfronthosting.co.za>
In-reply-to
Content
It seems that joining UNC path to a directory root fails:

Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ntpath import join
>>> join('c:\\', '\\\\server\\mount\\dir')
'c:\\\\server\\mount\\dir'

When the first argument contains also something else everything works fine:

>>> join('c:\\dir', '\\\\server\\mount\\dir')
'\\\\server\\mount\\dir'

I would say this is a bug. Obviously fixing this changes behavior, but I have hard time believing that anyone relies on the current buggy output.

On the other hand, I was today reported a bug in my software that was caused by this. Funny thing was that the bug was in code that was added as a workaround for issue #3426 (i.e. use `join(os.getcwdu(), path)` instead of `abspath(path)` when path is Unicode). Luckily adding another workaround for this issue is pretty easy.
History
Date User Action Args
2012-12-05 14:58:42pekka.klarcksetrecipients: + pekka.klarck, georg.brandl, jpe, ocean-city, BreamoreBoy
2012-12-05 14:58:42pekka.klarcksetmessageid: <1354719522.15.0.0579197901119.issue1209447@psf.upfronthosting.co.za>
2012-12-05 14:58:42pekka.klarcklinkissue1209447 messages
2012-12-05 14:58:41pekka.klarckcreate