diff mercurial/util.py @ 1976:df8416346bb7

Enable path validation for copy, rename, debugwalk and other canonpath users. This fixed the last bit of issue134. Added some tests to test-rename and test-walk.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 19 Mar 2006 14:53:58 +0100
parents f92cf4a8cedd
children 04c17fc39c84 4b0535c678d6
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -185,7 +185,9 @@ def canonpath(root, cwd, myname):
         name = os.path.join(root, cwd, name)
     name = os.path.normpath(name)
     if name.startswith(rootsep):
-        return pconvert(name[len(rootsep):])
+        name = name[len(rootsep):]
+        audit_path(name)
+        return pconvert(name)
     elif name == root:
         return ''
     else: