The Pattern.quote was not enough, a Matcher.quoteReplacement would also be required. However, we don't really need regular expressions here, so just use the literal "replace".
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1109 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
package com.threerings.tools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
@@ -110,7 +109,8 @@ public class CompiledConfigTask extends Task
|
||||
}
|
||||
|
||||
String baseDir = getProject().getBaseDir().getPath();
|
||||
File target = new File(source.getPath().replaceAll(Pattern.quote(baseDir), _dest.getPath()));
|
||||
System.out.println("Converting source " + source + " by replacing " + baseDir + " with " + _dest);
|
||||
File target = new File(source.getPath().replace(baseDir, _dest.getPath()));
|
||||
target = new File(FileUtil.resuffix(target, ".xml", ".dat"));
|
||||
return target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user