Der Code in der unzip.php ab Zeile 100 scheint mir für den Wechsel von /verzeichnis/ ins Root verantwortlich zu sein:
// create absolute/relative paths
$sAddonName = \basename(__DIR__);
$sScriptPath = dirname($_SERVER["SCRIPT_FILENAME"]);
$sAppDir = str_replace(['\\\\','//'], '/',__DIR__);
$sDocRoot = str_replace(['\\','//'],'/',realpath($_SERVER["DOCUMENT_ROOT"]));
$sScriptName = str_replace(['\\','//'],'/',realpath($_SERVER["SCRIPT_FILENAME"]));
$iSharedHosting = ($isWindows ? 0 : (strcmp(md5($sScriptPath),md5($sAppDir)))); // ist leer
$sPathPattern = "/^(.*?\/)admin\/.*$/";
$sLink = \str_replace(['\\','//'],'/',__DIR__).'/admin/';
$sAppRel = \str_replace($sDocRoot,'',\dirname($sScriptName)); // ist /verzeichnis (Zeile 109)
$sAppRel = (($iSharedHosting != 0) ? '' : $sAppRel); // ist leer
$sAppRel = rtrim((empty($sAppRel) ? '/' : $sAppRel),'/').'/'; // ist leer
$sAcpRel = $sAppRel.'admin/'; // ist /admin/
$sAppPath = \preg_replace ($sPathPattern, "$1", $sLink, 1 );
$sOldPath = \str_replace('\\','/',\getcwd()).'/';
Ich habe im Code oben per Kommentar den Variableninhalt eingefügt. In Zeile 109 ist $sAppRel noch /verzeichnis und ab Zeile 110 ist die Variable leer. $iSharedHosting ist übrigens bei mir auch leer.
Was sagt jetzt der Chef dazu? @Dietmar