1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 01:34:40 +01:00

Mark BC-breaking change

This commit is contained in:
Daniil Gentili 2023-09-23 15:43:01 +02:00
parent d6b0926c71
commit 4df94b819c
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 4 additions and 12 deletions

2
docs

@ -1 +1 @@
Subproject commit d5a18d7fd3a58fa5bfd5b9145a7d43fbc2c4cb74 Subproject commit cad57ac8e45ff6776dfa59c8e658831b17956f8e

@ -1 +1 @@
Subproject commit e9a5b801024d4bf9d083eb4204bebb25989cee64 Subproject commit 8c533873cef498a60b1d14c9a7198c4e3e0312f0

View File

@ -20,6 +20,7 @@ declare(strict_types=1);
namespace danog\MadelineProto; namespace danog\MadelineProto;
use AssertionError;
use danog\MadelineProto\Ipc\IpcState; use danog\MadelineProto\Ipc\IpcState;
use const LOCK_EX; use const LOCK_EX;
@ -97,16 +98,7 @@ final class SessionPaths
return; return;
} }
if (!isDirectory($session) && isFile("$session.safe.php")) { if (!isDirectory($session) && isFile("$session.safe.php")) {
deleteFile($session); throw new AssertionError("MadelineProto v7 sessions are not supported, please recreate the session to use MadelineProto v8!");
createDirectory($session);
foreach (['safe.php', 'lightState.php', 'lock', 'ipc', 'callback.ipc', 'ipcState.php'] as $part) {
if (exists("$session.$part")) {
move("$session.$part", $session.DIRECTORY_SEPARATOR."$part");
}
if (exists("$session.$part.lock")) {
move("$session.$part.lock", $session.DIRECTORY_SEPARATOR."$part.lock");
}
}
} }
} }
/** /**