From 278b39987972e97bd572bfc52dc26856747fb073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Thu, 12 Sep 2019 09:45:57 +0200 Subject: [PATCH 1/2] Avoid issues in case export directory doesn't exist --- .../ep_products/Classes/Command/ExportCommandController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php b/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php index 58e08a37..afa9a2b4 100644 --- a/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php +++ b/public/typo3conf/ext/ep_products/Classes/Command/ExportCommandController.php @@ -91,8 +91,8 @@ class ExportCommandController extends Command '%s/fileadmin/reseller', \TYPO3\CMS\Core\Core\Environment::getPublicPath() ); - if (!mkdir($destinationFolder, 0755) && !is_dir($destinationFolder)) { - throw new \RuntimeException(sprintf('Directory "%s" was not created', $destinationFolder)); + if (!file_exists($destinationFolder)) { + mkdir($destinationFolder, 0755); } foreach ($resellers as $reseller) { /** @var Reseller $reseller */ From 75457ded6b647918566a76227a3cad11bde4f6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Thu, 12 Sep 2019 09:46:11 +0200 Subject: [PATCH 2/2] Don't allow command to be scheduled via backend --- public/typo3conf/ext/ep_products/Configuration/Commands.php | 1 + 1 file changed, 1 insertion(+) diff --git a/public/typo3conf/ext/ep_products/Configuration/Commands.php b/public/typo3conf/ext/ep_products/Configuration/Commands.php index 81b68e78..d63c300c 100644 --- a/public/typo3conf/ext/ep_products/Configuration/Commands.php +++ b/public/typo3conf/ext/ep_products/Configuration/Commands.php @@ -3,5 +3,6 @@ return [ 'ep:export' => [ 'class' => \EP\EpProducts\Command\ExportCommandController::class, + 'scheduleable' => false, ], ];