You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2003/11/10 17:42:19 UTC
cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/ant CopyPoliciesTask.java
andreas 2003/11/10 08:42:19
Modified: src/java/org/apache/lenya/cms/ant CopyPoliciesTask.java
Log:
fixed file path regexp bug
Revision Changes Path
1.2 +3 -6 cocoon-lenya/src/java/org/apache/lenya/cms/ant/CopyPoliciesTask.java
Index: CopyPoliciesTask.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ant/CopyPoliciesTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CopyPoliciesTask.java 19 Sep 2003 11:31:54 -0000 1.1
+++ CopyPoliciesTask.java 10 Nov 2003 16:42:19 -0000 1.2
@@ -125,11 +125,8 @@
String srcPath;
try {
srcPath = authoringPolicies[i].getCanonicalPath();
- String destPath =
- srcPath.replaceFirst(
- srcDir.getCanonicalPath(),
- destDir.getCanonicalPath());
- File destFile = new File(destPath);
+ String policyPath = srcPath.substring(srcDir.getCanonicalPath().length());
+ File destFile = new File(destDir, policyPath);
FileUtil.copyFile(authoringPolicies[i], destFile);
} catch (IOException e) {
throw new BuildException(e);
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org