Fix case-insensitive plugin loading if a plugin is in two directories.

This commit is contained in:
Valentin Lorentz 2017-01-22 21:22:39 +01:00
parent e52db064ca
commit 8652c683ab

View File

@ -56,7 +56,7 @@ def loadPluginModule(name, ignoreDeprecation=False):
if name not in files:
search = lambda x: re.search(r'(?i)^%s$' % (name,), x)
matched_names = list(filter(search, files))
if len(matched_names) == 1:
if len(matched_names) >= 1:
name = matched_names[0]
else:
raise ImportError(name)