From 9c0cbc7a34ad01cbd902567fd79eec83c8ccdf15 Mon Sep 17 00:00:00 2001 From: Alexis Guyomar Date: Mon, 3 Feb 2025 11:11:53 +0100 Subject: [PATCH] fix: using logservices and filesystem --- classes/Router/Middlewares/UpdateLogExists.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/Router/Middlewares/UpdateLogExists.php b/classes/Router/Middlewares/UpdateLogExists.php index b39f1e2bf..4fea8dd32 100644 --- a/classes/Router/Middlewares/UpdateLogExists.php +++ b/classes/Router/Middlewares/UpdateLogExists.php @@ -3,16 +3,16 @@ namespace PrestaShop\Module\AutoUpgrade\Router\Middlewares; use PrestaShop\Module\AutoUpgrade\Router\Routes; +use PrestaShop\Module\AutoUpgrade\Task\TaskType; class UpdateLogExists extends AbstractMiddleware { public function process(): ?string { - $activeUpdateLogFile = $this->upgradeContainer->getLogsState()->getActiveRestoreLogFile(); - $activeUpdateLogPath = $this->upgradeContainer->getProperty($this->upgradeContainer::LOGS_PATH) . DIRECTORY_SEPARATOR . $activeUpdateLogFile; + $activeUpdateLogPath = $this->upgradeContainer->getLogsService()->getLogsPath(TaskType::TASK_TYPE_UPDATE); - if ($activeUpdateLogFile === null - || !$this->upgradeContainer->getFileStorage()->exists($activeUpdateLogPath)) { + if ($activeUpdateLogPath === null + || !$this->upgradeContainer->getFileSystem()->exists($activeUpdateLogPath)) { return Routes::HOME_PAGE; }