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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]