From 214c9fd6330490b33fefb0a2e32c956c06adbe88 Mon Sep 17 00:00:00 2001 From: Thayol Date: Thu, 30 Jul 2026 07:43:00 +0200 Subject: [PATCH] Fix initial state file creation --- index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index dba1537..a02a6f5 100644 --- a/index.php +++ b/index.php @@ -29,7 +29,11 @@ if ($error_reporting) { } if (!file_exists($state_file)) { - mkdir($state_file, 0777, true); + $dirname = dirname($state_file); + if (!is_dir($dirname)) { + mkdir($dirname, 0777, true); + } + file_put_contents($state_file, json_encode([ "lobbies" => []])); }