changeset 9099:3d456bf32f18

Use os.path.split() for MBCS with win32mbcs extension.
author Shun-ichi GOTO <shunichi.goto@gmail.com>
date Thu, 09 Jul 2009 21:39:19 +0900
parents 5e4654f5522d
children 623f96ae3a26
files mercurial/windows.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/windows.py	Wed Jul 08 09:48:48 2009 -0400
+++ b/mercurial/windows.py	Thu Jul 09 21:39:19 2009 +0900
@@ -209,11 +209,9 @@
     dircache = {} # dirname -> filename -> status | None if file does not exist
     for nf in files:
         nf  = ncase(nf)
-        pos = nf.rfind(sep)
-        if pos == -1:
-            dir, base = '.', nf
-        else:
-            dir, base = nf[:pos+1], nf[pos+1:]
+        dir, base = os.path.split(nf)
+        if not dir:
+            dir = '.'
         cache = dircache.get(dir, None)
         if cache is None:
             try: