Tries a new fix to remove the pesky FileNotFoundException caused by the server version container
Some checks failed
KnarCraft/Minecraft-Server-Launcher/pipeline/head There was a failure building this commit

This commit is contained in:
2020-08-17 11:26:45 +02:00
parent 8e626d8097
commit c721aef2a6
3 changed files with 41 additions and 1 deletions

View File

@ -92,6 +92,11 @@ public class ServerVersionContainer implements java.io.Serializable {
PrintWriter file;
try {
if (!saveFile.exists()) {
if (!saveFile.getParentFile().exists()) {
if (!saveFile.getParentFile().mkdirs()) {
throw new FileNotFoundException("Unable to create folder for version file");
}
}
if (!saveFile.createNewFile()) {
throw new FileNotFoundException("Unable to create version file");
}