From d0db6d6acf3fa2957400ff8687054028ad31f000 Mon Sep 17 00:00:00 2001
From: Benjamin Mack <benni@typo3.org>
Date: Tue, 25 Mar 2014 16:05:38 +0100
Subject: [PATCH] [BUGFIX] GeneralUtility->copyDirectory does not fix
 permissions

Instead of using TYPO3-internal functions
for creating directories and moving files,
default PHP functions are used. This creates
problems with permissions e.g. when
installing the introduction package.

Releases: 6.2
Resolves: #57298
Change-Id: Ifa5e92fd245db033dacbc3bcd15d487bd7af2101
Reviewed-on: https://review.typo3.org/28772
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
---
 typo3/sysext/core/Classes/Utility/GeneralUtility.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php
index 2285f3a1ee89..9921960be53d 100644
--- a/typo3/sysext/core/Classes/Utility/GeneralUtility.php
+++ b/typo3/sysext/core/Classes/Utility/GeneralUtility.php
@@ -3744,10 +3744,11 @@ Connection: close
 				\RecursiveIteratorIterator::SELF_FIRST
 			);
 			foreach ($iterator as $item) {
+				$target = $destination . '/' . $iterator->getSubPathName();
 				if ($item->isDir()) {
-					@mkdir($destination . '/' . $iterator->getSubPathName());
+					static::mkdir($target);
 				} else {
-					@copy($item, $destination . '/' . $iterator->getSubPathName());
+					static::upload_copy_move($item, $target);
 				}
 			}
 		}
-- 
GitLab