From 8476c78589d4ad8fc25d38a2861c78bf9d28c8d2 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 17 Aug 2021 19:32:47 +0200 Subject: [PATCH] Makes sure never to add a newline when writing an empty string to a file --- .../minecraftserverlauncher/utility/CommonFunctions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/knarcraft/minecraftserverlauncher/utility/CommonFunctions.java b/src/main/java/net/knarcraft/minecraftserverlauncher/utility/CommonFunctions.java index aefc993..7e20d7e 100644 --- a/src/main/java/net/knarcraft/minecraftserverlauncher/utility/CommonFunctions.java +++ b/src/main/java/net/knarcraft/minecraftserverlauncher/utility/CommonFunctions.java @@ -158,7 +158,7 @@ public final class CommonFunctions { * @throws IOException

If unable to write to the file

*/ public static void writeFile(String path, String text) throws IOException { - writeFile(path, text, true); + writeFile(path, text, !text.equals("")); } /**