From 0068198abd7fd2367107a0596afb548d94acfe03 Mon Sep 17 00:00:00 2001 From: Ulugbek Date: Sat, 9 Jul 2022 15:48:09 +0200 Subject: [PATCH] TeaVMTool: re-use already created file --- tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java b/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java index 10e1ca1a3..17148864e 100644 --- a/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java +++ b/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java @@ -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); }