From c7c16f091b3b8a2183d847cf6d618d6aaa3ed912 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Tue, 11 Aug 2026 10:10:57 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B09902=20-=20Can't=20MTP=20with=203.3.0-de?= =?UTF-8?q?v?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/setuputils.class.inc.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index e55d30ce9..29f4e193e 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -885,13 +885,16 @@ class SetupUtils /** * Helper to copy a directory to a target directory, skipping .SVN files (for developer's comfort!) * Returns true if successful - * @param $sSource - * @param $sDest + * + * @param string $sSource + * @param string $sDest * @param bool $bUseSymbolicLinks + * @param bool $bCreateDirsIfNeeded + * * @return bool - * @throws Exception + * @throws \Exception */ - public static function copydir(string $sSource, string $sDest, bool $bUseSymbolicLinks = false): bool + public static function copydir(string $sSource, string $sDest, bool $bUseSymbolicLinks = false, bool $bCreateDirsIfNeeded = false): bool { if (is_dir($sSource)) { if (!is_dir($sDest)) { @@ -934,6 +937,12 @@ class SetupUtils return copy($sSource, $sDest); } } else { + if ($bCreateDirsIfNeeded) { + $bRet = mkdir($sSource, 0777, true); + $bRet &= mkdir($sDest, 0777, true); + + return $bRet; + } return false; } }