On upgrade #318, extractTo() must overwrite

This commit is contained in:
the-djmaze 2022-04-06 11:29:53 +02:00
parent 95b7dee402
commit 4d898bfef0

View file

@ -196,7 +196,7 @@ abstract class Upgrade
if ($sTmp) { if ($sTmp) {
static::backup(); static::backup();
$oArchive = new \PharData($sTmp, 0); $oArchive = new \PharData($sTmp, 0);
$bResult = $oArchive->extractTo(\rtrim(APP_VERSION_ROOT_PATH, '\\/')); $bResult = $oArchive->extractTo(\rtrim(APP_VERSION_ROOT_PATH, '\\/'), null, true);
if (!$bResult) { if (!$bResult) {
throw new \Exception('Cannot extract core files: '.$oArchive->getStatusString()); throw new \Exception('Cannot extract core files: '.$oArchive->getStatusString());
} }