mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-17 18:01:24 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user