From 024f12800c6bd48afdc398ea08b3a6f67364b70a Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Fri, 16 Nov 2018 16:52:45 +0100 Subject: [PATCH] Fix invalid output directory creation, fixes #141 --- src/Extensions/Shopware/DataGenerator/Struct/Config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Extensions/Shopware/DataGenerator/Struct/Config.php b/src/Extensions/Shopware/DataGenerator/Struct/Config.php index 9c79919e..3a2b36ab 100644 --- a/src/Extensions/Shopware/DataGenerator/Struct/Config.php +++ b/src/Extensions/Shopware/DataGenerator/Struct/Config.php @@ -341,7 +341,8 @@ public function getCreateImages() public function createOutputDir() { - if (!is_dir('output') && !mkdir('output') && !is_dir('output')) { + $outputDir = getcwd() . '/output'; + if (!is_dir($outputDir) && !mkdir($outputDir) && !is_dir($outputDir)) { throw new \RuntimeException(sprintf('Directory "%s" was not created', 'output')); } }