equal
deleted
inserted
replaced
324 If n1 is a relative path, it's assumed it's |
324 If n1 is a relative path, it's assumed it's |
325 relative to root. |
325 relative to root. |
326 n2 should always be relative to root. |
326 n2 should always be relative to root. |
327 ''' |
327 ''' |
328 if not n1: return localpath(n2) |
328 if not n1: return localpath(n2) |
|
329 if os.path.isabs(n1): |
|
330 if os.path.splitdrive(root)[0] != os.path.splitdrive(n1)[0]: |
|
331 return os.path.join(root, localpath(n2)) |
|
332 n2 = '/'.join((pconvert(root), n2)) |
329 a, b = n1.split(os.sep), n2.split('/') |
333 a, b = n1.split(os.sep), n2.split('/') |
330 a.reverse() |
334 a.reverse() |
331 b.reverse() |
335 b.reverse() |
332 while a and b and a[-1] == b[-1]: |
336 while a and b and a[-1] == b[-1]: |
333 a.pop() |
337 a.pop() |