Remove the old favicon.svg in the second update step, which runs the new code

The file copy still runs the code of the installed version, which does not
know the list; the archive check from 1.21.6 to 1.21.7 left the file behind.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-21 07:41:15 +02:00
1 parent 45d1141951
commit d8c8cbe7bd
1 file changed
+5 -5
+5 -5
View File
@@ -34,6 +34,8 @@ final class ArchiveUpdate
*
* Das Zusammenführen kopiert nur hinzu. Bliebe favicon.svg liegen, lieferte der Webserver
* sie weiter selbst aus - das mitgelieferte Zeichen, auch wenn ein eigenes Symbol gesetzt ist.
* Gelöscht wird in finish(): Das Kopieren erledigt noch der Code der alten Fassung, der
* diese Liste nicht kennt.
*/
private const ENTFALLEN_IN_PUBLIC = ['favicon.svg'];
@@ -229,11 +231,6 @@ final class ArchiveUpdate
// public/ wird Datei für Datei aktualisiert: Schriften und erzeugte Bündel gehören dem
// Betreiber und wären sonst weg.
$this->mergePublic($quelle.'/public', $this->root.'/public');
foreach (self::ENTFALLEN_IN_PUBLIC as $eintrag) {
if (is_file($this->root.'/public/'.$eintrag) && !is_file($quelle.'/public/'.$eintrag)) {
@unlink($this->root.'/public/'.$eintrag);
}
}
// Ebenso plugins/: die mitgelieferten Plugins werden aktualisiert, ein vom Betreiber
// installiertes Plugin bleibt, weil sein Ordner im Archiv nicht vorkommt.
$this->mergePublic($quelle.'/plugins', $this->root.'/plugins');
@@ -319,6 +316,9 @@ final class ArchiveUpdate
@unlink($this->root.'/'.self::MARKE);
$this->updater->maintenance(false);
$this->protokoll('ok Migrationen: '.$schritte[0]['detail']);
foreach (self::ENTFALLEN_IN_PUBLIC as $eintrag) {
@unlink($this->root.'/public/'.$eintrag);
}
$schritte[] = ['step' => 'Aufräumen', 'ok' => true, 'detail' => $this->aufraeumen()];
$schritte[] = ['step' => 'Fertig', 'ok' => true, 'detail' => sprintf(
'Fassung %s läuft. Der vorherige Stand liegt unter var/update/ (die zwei jüngsten bleiben).',