From b1b6bc99f48b97d2f14b225b1a7f20af477e94da Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Thu, 18 Nov 2021 21:52:05 +0100
Subject: [PATCH] [BUGFIX] Create directory structure for temporary files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Instead of using `GeneralUtility::mkdir` the method
`GeneralUtility::mkdir_deep` should be used to avoid errors
if the parent directory does not yet exist.

Resolves: #96029
Releases: master, 11.5
Change-Id: Ic5005df117ddedd8fcae5b9c41c092f8328c8a57
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72236
Tested-by: core-ci <typo3@b13.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
---
 typo3/sysext/impexp/Classes/ImportExport.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/impexp/Classes/ImportExport.php b/typo3/sysext/impexp/Classes/ImportExport.php
index 5d751cbbd8e2..9c22990dda8d 100644
--- a/typo3/sysext/impexp/Classes/ImportExport.php
+++ b/typo3/sysext/impexp/Classes/ImportExport.php
@@ -1183,7 +1183,7 @@ abstract class ImportExport
                 random_int(1, PHP_INT_MAX)
             );
         } while (is_dir($temporaryFolderName));
-        GeneralUtility::mkdir($temporaryFolderName);
+        GeneralUtility::mkdir_deep($temporaryFolderName);
         return $temporaryFolderName;
     }
 
-- 
GitLab