diff --git a/src/Controller/OgBoot/OgLive/Webhook/InstallOgLiveResponseAction.php b/src/Controller/OgBoot/OgLive/Webhook/InstallOgLiveResponseAction.php index 645fe8f..f7ac0f6 100644 --- a/src/Controller/OgBoot/OgLive/Webhook/InstallOgLiveResponseAction.php +++ b/src/Controller/OgBoot/OgLive/Webhook/InstallOgLiveResponseAction.php @@ -30,7 +30,7 @@ class InstallOgLiveResponseAction extends AbstractController { public CONST string OG_LIVE_INSTALL_SUCCESS = 'success'; public CONST string OG_LIVE_INSTALL_FAILED = 'failure'; - const string OG_BOOT_DIRECTORY = '/opt/opengnsys/ogboot/tftpboot//'; + const string OG_BOOT_DIRECTORY = '/opt/opengnsys/ogboot/tftpboot/'; public function __construct( protected readonly EntityManagerInterface $entityManager, @@ -94,7 +94,7 @@ class InstallOgLiveResponseAction extends AbstractController private function updateOgLive (OgLive $ogLive, mixed $details, string $status): void { if ( is_array($details) && $status === self::OG_LIVE_INSTALL_SUCCESS) { - $ogLive->setName($this->simplifyOgLiveFilenameService->__invoke($details['directory'])); + $ogLive->setName($this->simplifyOgLiveFilenameService->__invoke(str_replace(self::OG_BOOT_DIRECTORY, '', $details['directory']))); $ogLive->setDate(new \DateTime($this->extractOgLiveFilenameDateService->__invoke($details['directory']))); $ogLive->setFilename(str_replace(self::OG_BOOT_DIRECTORY, '', $details['directory'])); $ogLive->setInstalled(true);