Skip to content

Commit

Permalink
fix: using logservices and filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Feb 3, 2025
1 parent 34c76c7 commit 9c0cbc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/Router/Middlewares/UpdateLogExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9c0cbc7

Please sign in to comment.