diff --git a/server/src/com/unciv/app/server/UncivServer.kt b/server/src/com/unciv/app/server/UncivServer.kt index 055b360d1f..ae15891513 100644 --- a/server/src/com/unciv/app/server/UncivServer.kt +++ b/server/src/com/unciv/app/server/UncivServer.kt @@ -123,7 +123,10 @@ private class UncivServerRunner : CliktCommand() { private fun serverRun(serverPort: Int, fileFolderName: String) { val portStr: String = if (serverPort == 80) "" else ":$serverPort" - echo("Starting UncivServer for ${File(fileFolderName).absolutePath} on http://localhost$portStr") + + val file = File(fileFolderName) + echo("Starting UncivServer for ${file.absolutePath} on http://localhost$portStr") + if (!file.exists()) file.mkdirs() val server = embeddedServer(Netty, port = serverPort) { routing { get("/isalive") {