Fixed export issue zhere the loadresources.xml file couldn't be created

because its parent folder do not exist.
This commit is contained in:
Zukero
2017-12-18 19:04:51 +01:00
parent 407d50a01e
commit e697f93cf5

View File

@@ -1290,6 +1290,9 @@ public class Project implements ProjectTreeNode, Serializable {
}
Transformer transformer = TransformerFactory.newInstance().newTransformer();
if (!outputFile.getParentFile().exists()) {
outputFile.getParentFile().mkdirs();
}
Result output = new StreamResult(new FileOutputStream(outputFile));
Source input = new DOMSource(doc);
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");