TeaVMTool: re-use already created file
@@ -460,7 +460,7 @@ public class TeaVMTool {
generatedFiles.add(outputFile);
if (targetType == TeaVMTargetType.JAVASCRIPT) {
- try (OutputStream output = new FileOutputStream(new File(targetDirectory, outputName), true)) {
+ try (OutputStream output = new FileOutputStream(outputFile, true)) {
try (Writer writer = new OutputStreamWriter(output, StandardCharsets.UTF_8)) {
additionalJavaScriptOutput(writer);
}
