On Sat, 14 Aug 2010 14:18:46 -0000
tbnorth <email address hidden> wrote:
> Aha! :-) Maybe that's how
> the fix can be pushed into g.os_path_xxx, we just need a g.os_path_isabs
> which knows such paths are really relative, and to make sure the other
> g.os_path_xxx handle the joins correctly.
Meh, g.os_path_join doesn't handle these correctly, it says:
>>> os.path.join("a:\\path", "\\other")
'\\other'
So, I've written code for that case. What about this one:
On Sat, 14 Aug 2010 14:18:46 -0000
tbnorth <email address hidden> wrote:
> Aha! :-) Maybe that's how
> the fix can be pushed into g.os_path_xxx, we just need a g.os_path_isabs
> which knows such paths are really relative, and to make sure the other
> g.os_path_xxx handle the joins correctly.
Meh, g.os_path_join doesn't handle these correctly, it says:
>>> os.path. join("a: \\path" , "\\other")
'\\other'
So, I've written code for that case. What about this one:
>>> os.path. join("\ \\\server\ \share" , "\\root\\relative")
'\\root\\relative'
That's wrong, but what's right, \share\ \root\\ relative' or \root\\ relative' ???
'\\\\server\
'\\\\server\
The first, I guess?
Cheers -Terry