mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Create server.log properly on non-existent directories
This commit is contained in:
parent
f7baf46a54
commit
af4eb2ab1e
@ -126,6 +126,9 @@ namespace pocketmine {
|
|||||||
|
|
||||||
define("pocketmine\\ANSI", (Utils::getOS() !== "win" or isset($opts["enable-ansi"])) and !isset($opts["disable-ansi"]));
|
define("pocketmine\\ANSI", (Utils::getOS() !== "win" or isset($opts["enable-ansi"])) and !isset($opts["disable-ansi"]));
|
||||||
|
|
||||||
|
|
||||||
|
@mkdir(\pocketmine\DATA, 0777, true);
|
||||||
|
|
||||||
//Logger has a dependency on timezone, so we'll set it to UTC until we can get the actual timezone.
|
//Logger has a dependency on timezone, so we'll set it to UTC until we can get the actual timezone.
|
||||||
date_default_timezone_set("UTC");
|
date_default_timezone_set("UTC");
|
||||||
$logger = new MainLogger(\pocketmine\DATA . "server.log", \pocketmine\ANSI);
|
$logger = new MainLogger(\pocketmine\DATA . "server.log", \pocketmine\ANSI);
|
||||||
|
@ -1455,7 +1455,7 @@ class Server{
|
|||||||
$this->autoloader = $autoloader;
|
$this->autoloader = $autoloader;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->filePath = $filePath;
|
$this->filePath = $filePath;
|
||||||
@mkdir($dataPath . "worlds/", 0777, true);
|
@mkdir($dataPath . "worlds/", 0777);
|
||||||
@mkdir($dataPath . "players/", 0777);
|
@mkdir($dataPath . "players/", 0777);
|
||||||
@mkdir($pluginPath, 0777);
|
@mkdir($pluginPath, 0777);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user