When a template called "/foo/bar/template.fm" has the
directive:
<include "header.fm">
the freemarker code will try to include the file
"/foo/header.fm" rather than "/foo/bar/header.fm". I
think this might be a mistake. This will fix it:
---
freemarker-2.1RC1/src/freemarker/template/Include.java
Sun Sep 29 06:33:28 2002
+++ freemarker/src/freemarker/template/Include.java Thu
Oct 10 17:37:09 2002@@ -86,7 +86,7 @@
{
super.setLocation(template, beginColumn,
beginLine, endColumn, endLine);
templatePath = template.getName();
- int lastSlash = templatePath.indexOf('/');
+ int lastSlash = templatePath.lastIndexOf('/');
templatePath = lastSlash == -1 ? "" :
templatePath.substring(0, lastSlash + 1);
}
Nobody/Anonymous ( nobody ) - 2002-10-10 17:43:41 PDT
5
Closed
Accepted
Dániel Dékány
None
None
Public
|
Date: 2002-10-11 18:46:41 PDT Logged In: YES |