mercurial/util.py
changeset 2278 3711e23ab10a
parent 2271 90b122730d32
child 2280 09ed44225571
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -213,7 +213,7 @@ def canonpath(root, cwd, myname):
     if not os.path.isabs(name):
         name = os.path.join(root, cwd, name)
     name = os.path.normpath(name)
-    if name.startswith(rootsep):
+    if name != rootsep and name.startswith(rootsep):
         name = name[len(rootsep):]
         audit_path(name)
         return pconvert(name)