mercurial/extensions.py
changeset 20645 7d83c3b6e8d9
parent 20622 352abbb0be88
child 21229 54d7657d7d1e
--- a/mercurial/extensions.py	Tue Mar 04 09:56:59 2014 -0600
+++ b/mercurial/extensions.py	Wed Mar 05 09:31:05 2014 +0000
@@ -43,10 +43,10 @@
 
 def loadpath(path, module_name):
     module_name = module_name.replace('.', '_')
-    path = util.expandpath(path)
+    path = util.normpath(util.expandpath(path))
     if os.path.isdir(path):
         # module/__init__.py style
-        d, f = os.path.split(path.rstrip('/'))
+        d, f = os.path.split(path)
         fd, fpath, desc = imp.find_module(f, [d])
         return imp.load_module(module_name, fd, fpath, desc)
     else: