Skip to content
Snippets Groups Projects
Commit 3b7d5505 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

fixing issue where folders where not created for a given filepath

parent 26998ce1
No related branches found
No related tags found
1 merge request!644Refactored IConverter and XmlParser across project
Pipeline #8832 failed
......@@ -82,7 +82,9 @@ public abstract class Converter {
public File model2File(Model model, String filePath)
throws InconsistentModelException, IOException, ConverterException {
String xml = model2Xml(model);
try (PrintWriter out = new PrintWriter(filePath)) {
File file = new File(filePath);
file.getParentFile().mkdirs();
try (PrintWriter out = new PrintWriter(file)) {
out.println(xml);
}
return new File(filePath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment