Skip to content

Commit

Permalink
[PlaybackSersialiser] Fix Filethread always appending instead of trun…
Browse files Browse the repository at this point in the history
…cating the output file
  • Loading branch information
ScribbleTAS committed Dec 19, 2024
1 parent c709bc4 commit 8609421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/minecrafttas/tasmod/util/FileThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class FileThread extends Thread {
private final List<String> output = new ArrayList<>();

public FileThread(Path fileLocation, boolean append) throws IOException {
OutputStream outStream = Files.newOutputStream(fileLocation, StandardOpenOption.CREATE, StandardOpenOption.APPEND);
OutputStream outStream = Files.newOutputStream(fileLocation, StandardOpenOption.CREATE, append ? StandardOpenOption.APPEND : StandardOpenOption.TRUNCATE_EXISTING);
stream = new PrintWriter(new OutputStreamWriter(outStream, StandardCharsets.UTF_8));
}

Expand Down

0 comments on commit 8609421

Please sign in to comment.