Comment 22 for bug 613153

Revision history for this message
tbnorth (terry-n-brown) wrote : Re: [Bug 613153] Re: unable to describe root directory on thumb drive

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,
'\\\\server\\share\\root\\relative' or
'\\\\server\\root\\relative' ???

The first, I guess?

Cheers -Terry