Message176988
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. |
|
Date |
User |
Action |
Args |
2012-12-05 14:58:42 | pekka.klarck | set | recipients:
+ pekka.klarck, georg.brandl, jpe, ocean-city, BreamoreBoy |
2012-12-05 14:58:42 | pekka.klarck | set | messageid: <1354719522.15.0.0579197901119.issue1209447@psf.upfronthosting.co.za> |
2012-12-05 14:58:42 | pekka.klarck | link | issue1209447 messages |
2012-12-05 14:58:41 | pekka.klarck | create | |
|