[FIX] module loading: allow addons path entries to have substring of others.
i.e. having ./addons/ and ./addons2/ is now possible bzr revid: chm@openerp.com-20130307131104-ju2n7zm7yvced68h
This commit is contained in:
parent
617c03a19c
commit
ab2dd715de
|
@ -139,6 +139,7 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False):
|
|||
# Is it below 'addons_path' or 'root_path'?
|
||||
name = os.path.normcase(os.path.normpath(name))
|
||||
for root in adps + [rtp]:
|
||||
root = os.path.normcase(os.path.normpath(root)) + os.sep
|
||||
if name.startswith(root):
|
||||
base = root.rstrip(os.sep)
|
||||
name = name[len(base) + 1:]
|
||||
|
|
Loading…
Reference in New Issue