Fix initial state file creation

This commit is contained in:
2026-07-30 07:43:00 +02:00
parent 829e10437e
commit 214c9fd633
+5 -1
View File
@@ -29,7 +29,11 @@ if ($error_reporting) {
} }
if (!file_exists($state_file)) { 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" => []])); file_put_contents($state_file, json_encode([ "lobbies" => []]));
} }