locate_static_file: Reverse search order.

This makes plugin static files more consistent with other parts of the
plugin system where the ordering of g.plugins is meaningful.
This commit is contained in:
Neil Williams
2013-07-31 11:16:08 -07:00
parent 4aa1f713f6
commit f1534b52d9

View File

@@ -34,7 +34,7 @@ def locate_static_file(name):
static_dirs = [plugin.static_dir for plugin in g.plugins]
static_dirs.insert(0, g.paths['static_files'])
for static_dir in static_dirs:
for static_dir in reversed(static_dirs):
file_path = os.path.join(static_dir, name.lstrip('/'))
if os.path.exists(file_path):
return file_path