You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by wg...@apache.org on 2007/06/24 15:41:06 UTC
svn commit: r550224 -
/velocity/texen/trunk/src/java/org/apache/texen/ant/TexenTask.java
Author: wglass
Date: Sun Jun 24 06:41:05 2007
New Revision: 550224
URL: http://svn.apache.org/viewvc?view=rev&rev=550224
Log:
Include a period before prefix when deleting. Fixes TEXEN-10.
Modified:
velocity/texen/trunk/src/java/org/apache/texen/ant/TexenTask.java
Modified: velocity/texen/trunk/src/java/org/apache/texen/ant/TexenTask.java
URL: http://svn.apache.org/viewvc/velocity/texen/trunk/src/java/org/apache/texen/ant/TexenTask.java?view=diff&rev=550224&r1=550223&r2=550224
==============================================================================
--- velocity/texen/trunk/src/java/org/apache/texen/ant/TexenTask.java (original)
+++ velocity/texen/trunk/src/java/org/apache/texen/ant/TexenTask.java Sun Jun 24 06:41:05 2007
@@ -552,7 +552,7 @@
else
{
// We are going to do something special
- // for properties that have a "file.contents"
+ // for properties that have a ".file.contents"
// suffix: for these properties will pull
// in the contents of the file and make
// them available in the context. So for
@@ -564,7 +564,8 @@
// and make it available in the context as
// $license. This should make texen a little
// more flexible.
- if (property.endsWith("file.contents"))
+ final String FILE_CONTENTS = ".file.contents";
+ if (property.endsWith(FILE_CONTENTS))
{
// We need to turn the license file from relative to
// absolute, and let Ant help :)
@@ -572,7 +573,7 @@
project.resolveFile(value).getCanonicalPath());
property = property.substring(
- 0, property.indexOf("file.contents") - 1);
+ 0, property.indexOf(FILE_CONTENTS));
}
c.put(property, value);