You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by wg...@apache.org on 2005/10/11 08:12:53 UTC
svn commit: r312815 -
/jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
Author: wglass
Date: Mon Oct 10 23:12:47 2005
New Revision: 312815
URL: http://svn.apache.org/viewcvs?rev=312815&view=rev
Log:
fix error on Linux of failing AbsoluteFileResourceLoader (missing first slash)
Modified:
jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
Modified: jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java?rev=312815&r1=312814&r2=312815&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java (original)
+++ jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java Mon Oct 10 23:12:47 2005
@@ -115,14 +115,6 @@
throw new ResourceNotFoundException ( msg );
}
- /*
- * if a / leads off, then just nip that :)
- */
- if (template.startsWith("/"))
- {
- template = template.substring(1);
- }
-
int size = paths.size();
for (int i = 0; i < size; i++)
{
@@ -274,6 +266,14 @@
}
else
{
+ /*
+ * if a / leads off, then just nip that :)
+ */
+ if (template.startsWith("/"))
+ {
+ template = template.substring(1);
+ }
+
file = new File ( path, template );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org