diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php
index 2285f3a1ee893f53cb85084eaacc35abda58e9fa..9921960be53dc0284571e20235231ca903a4ed04 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);
 				}
 			}
 		}