mercurial/extensions.py
changeset 4580 b1716a8b32d3
parent 4569 622d8ed78b47
child 4582 7de7a80e7422
--- a/mercurial/extensions.py	Wed Jun 13 13:50:29 2007 -0700
+++ b/mercurial/extensions.py	Wed Jun 13 19:05:20 2007 -0700
@@ -31,7 +31,8 @@
         module_name = "hgext_%s" % name.replace('.', '_')
         if os.path.isdir(path):
             # module/__init__.py style
-            fd, fpath, desc = imp.find_module('', [path])
+            d, f = os.path.split(path)
+            fd, fpath, desc = imp.find_module(f, [d])
             mod = imp.load_module(module_name, fd, fpath, desc)
         else:
             mod = imp.load_source(module_name, path)