equal
deleted
inserted
replaced
177 def canonpath(root, cwd, myname): |
177 def canonpath(root, cwd, myname): |
178 """return the canonical path of myname, given cwd and root""" |
178 """return the canonical path of myname, given cwd and root""" |
179 if root == os.sep: |
179 if root == os.sep: |
180 rootsep = os.sep |
180 rootsep = os.sep |
181 else: |
181 else: |
182 rootsep = root + os.sep |
182 rootsep = root + os.sep |
183 name = myname |
183 name = myname |
184 if not name.startswith(os.sep): |
184 if not name.startswith(os.sep): |
185 name = os.path.join(root, cwd, name) |
185 name = os.path.join(root, cwd, name) |
186 name = os.path.normpath(name) |
186 name = os.path.normpath(name) |
187 if name.startswith(rootsep): |
187 if name.startswith(rootsep): |