equal
deleted
inserted
replaced
333 b.reverse() |
333 b.reverse() |
334 while a and b and a[-1] == b[-1]: |
334 while a and b and a[-1] == b[-1]: |
335 a.pop() |
335 a.pop() |
336 b.pop() |
336 b.pop() |
337 b.reverse() |
337 b.reverse() |
338 return os.sep.join((['..'] * len(a)) + b) |
338 return os.sep.join((['..'] * len(a)) + b) or '.' |
339 |
339 |
340 def canonpath(root, cwd, myname): |
340 def canonpath(root, cwd, myname): |
341 """return the canonical path of myname, given cwd and root""" |
341 """return the canonical path of myname, given cwd and root""" |
342 if root == os.sep: |
342 if root == os.sep: |
343 rootsep = os.sep |
343 rootsep = os.sep |