Author: henning
Date: Sun Mar  5 10:30:29 2006
New Revision: 383363

URL: http://svn.apache.org/viewcvs?rev=383363&view=rev
Log:
Reading docs _is_ actually a good thing. :-) We can reference the
absolute base dir in the properties file thus no longer need to meddle
with the relative pathes...



Modified:
    jakarta/velocity/engine/trunk/build/build.properties
    
jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java

Modified: jakarta/velocity/engine/trunk/build/build.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/build/build.properties?rev=383363&r1=383362&r2=383363&view=diff
==============================================================================
--- jakarta/velocity/engine/trunk/build/build.properties (original)
+++ jakarta/velocity/engine/trunk/build/build.properties Sun Mar  5 10:30:29 
2006
@@ -25,7 +25,7 @@
 # This is the relative base dir. This must be the root of the
 # Velocity distribution. All relative pathes are prefixed with
 # velocity.dir
-velocity.dir= .
+velocity.dir= ${basedir}
 
 # compile switches
 debug= on

Modified: 
jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java
URL: 
http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java?rev=383363&r1=383362&r2=383363&view=diff
==============================================================================
--- 
jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java
 (original)
+++ 
jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java
 Sun Mar  5 10:30:29 2006
@@ -56,9 +56,13 @@
     protected static String getFileName (String dir, String base, String ext)
     {
         StringBuffer buf = new StringBuffer();
-        if (dir != null)
+        
+        if (base != null && base.charAt(0) != '/')
         {
-            buf.append(dir).append('/');
+            if (dir != null)
+            {
+                buf.append(dir).append('/');
+            }
         }
         buf.append(base).append('.').append(ext);
         return buf.toString();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to