mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Place world conversion backups in <pwd>/backups/worlds instead of <pwd>/world_conversion_backups
This commit is contained in:
@@ -51,6 +51,7 @@ use function random_int;
|
|||||||
use function round;
|
use function round;
|
||||||
use function sprintf;
|
use function sprintf;
|
||||||
use function trim;
|
use function trim;
|
||||||
|
use const DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
class WorldManager{
|
class WorldManager{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@@ -224,7 +225,7 @@ class WorldManager{
|
|||||||
}
|
}
|
||||||
$this->server->getLogger()->notice("Upgrading world \"$name\" to new format. This may take a while.");
|
$this->server->getLogger()->notice("Upgrading world \"$name\" to new format. This may take a while.");
|
||||||
|
|
||||||
$converter = new FormatConverter($provider, $this->providerManager->getDefault(), $this->server->getDataPath() . "world_conversion_backups", $this->server->getLogger());
|
$converter = new FormatConverter($provider, $this->providerManager->getDefault(), $this->server->getDataPath() . "backups" . DIRECTORY_SEPARATOR . "worlds", $this->server->getLogger());
|
||||||
$provider = $converter->execute();
|
$provider = $converter->execute();
|
||||||
|
|
||||||
$this->server->getLogger()->notice("Upgraded world \"$name\" to new format successfully. Backed up pre-conversion world at " . $converter->getBackupPath());
|
$this->server->getLogger()->notice("Upgraded world \"$name\" to new format successfully. Backed up pre-conversion world at " . $converter->getBackupPath());
|
||||||
|
Reference in New Issue
Block a user