From f1534b52d92164d54dab365ed542350a2f4f04f0 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Wed, 31 Jul 2013 11:16:08 -0700 Subject: [PATCH] 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. --- r2/r2/lib/static.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/static.py b/r2/r2/lib/static.py index 4fa90ce90..ac2459df9 100755 --- a/r2/r2/lib/static.py +++ b/r2/r2/lib/static.py @@ -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