Create the directories for generated files if necessary
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6147 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -411,7 +411,11 @@ public abstract class InvocationTask extends GenTask
|
||||
if (_header != null) {
|
||||
data = _header + data;
|
||||
}
|
||||
new PrintWriter(new File(path), "UTF-8").append(data).close();
|
||||
File dest = new File(path);
|
||||
if (!dest.getParentFile().exists() && !dest.getParentFile().mkdirs()) {
|
||||
throw new BuildException("Unable to create directory for " + dest.getAbsolutePath());
|
||||
}
|
||||
new PrintWriter(dest, "UTF-8").append(data).close();
|
||||
}
|
||||
|
||||
protected static <T> void checkedAdd (List<T> list, T value)
|
||||
|
||||
Reference in New Issue
Block a user