diff mercurial/util.py @ 2090:eb40db373717

fix util.canonpath on windows. old test for absolute path was not portable. use os.path api instead.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Wed, 19 Apr 2006 09:08:45 -0700
parents f71e9656524f
children f5ebe964c6be
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -201,7 +201,7 @@ def canonpath(root, cwd, myname):
     else:
         rootsep = root + os.sep
     name = myname
-    if not name.startswith(os.sep):
+    if not os.path.isabs(name):
         name = os.path.join(root, cwd, name)
     name = os.path.normpath(name)
     if name.startswith(rootsep):