From 1ff8918621150dcbd9edf2b0ccd182e7b68ae7d5 Mon Sep 17 00:00:00 2001 From: JonathanCSmith Date: Mon, 7 Oct 2024 12:20:10 +0100 Subject: [PATCH] Small fix to create the log file if it doesn't already exist. --- .../uk/ac/franciscrickinstitute/twombli/TWOMBLIWindow.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/uk/ac/franciscrickinstitute/twombli/TWOMBLIWindow.java b/src/main/java/uk/ac/franciscrickinstitute/twombli/TWOMBLIWindow.java index 9e7a5c9..65e1be0 100644 --- a/src/main/java/uk/ac/franciscrickinstitute/twombli/TWOMBLIWindow.java +++ b/src/main/java/uk/ac/franciscrickinstitute/twombli/TWOMBLIWindow.java @@ -983,6 +983,7 @@ public void handleFutureComplete(Future future, boolean isPreview this.fibreImage = (ImagePlus) output.getOutput("maskImage"); this.micRadioButton.setEnabled(true); this.micImage = (ImagePlus) output.getOutput("gapImage"); + this.fibreRadioButton.setState(true); this.handleFibreButtonPressed(); } @@ -1019,7 +1020,7 @@ private void generateSummaries() { Path successLog = Paths.get(this.outputDirectory, "success.log"); boolean doHeader = true; - try (BufferedWriter successWriter = Files.newBufferedWriter(successLog, StandardOpenOption.APPEND)) { + try (BufferedWriter successWriter = Files.newBufferedWriter(successLog, StandardOpenOption.CREATE_NEW)) { for (CommandModule output : this.finishedFutures) { // Gather our basic info String filePrefix = (String) output.getInput("filePrefix");