Commit 0735d6e2 authored by Phillip Webb's avatar Phillip Webb

Fix TemplateLocation.anyExists logic

Fix broken logic in TemplateLocation.anyExists caused by not using the
local `searchPath` variable.

See gh-2184
Closes gh-2248
parent c0d5ad0f
......@@ -65,8 +65,8 @@ public class TemplateLocation {
searchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
+ searchPath.substring(ResourceLoader.CLASSPATH_URL_PREFIX.length());
}
if (this.path.startsWith(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX)) {
Resource[] resources = resolver.getResources(this.path);
if (searchPath.startsWith(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX)) {
Resource[] resources = resolver.getResources(searchPath);
for (Resource resource : resources) {
if (resource.exists()) {
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment