Fix initial state file creation
This commit is contained in:
@@ -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" => []]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user