Skip to content
Snippets Groups Projects
Commit b40a4115 authored by Helmut Hummel's avatar Helmut Hummel
Browse files

[BUGFIX] Remove symlink to typo3 folder in web dir

When upgrading from older TYPO3 versions, composer installation
from that version created a symlink to the typo3 folder.

Before trying to remove typo3/sysext, we need to ensure
to remove a potentially existing symlink to typo3 folder
to not accidentally delete that sysext folder within
the sources directory.

Resolves: #82090
Releases: master
Change-Id: I12ef27d6236a9dbe844803afce55247a23ee5358
Reviewed-on: https://review.typo3.org/53682


Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
parent 8d1dc167
Branches
Tags
No related merge requests found
......@@ -88,6 +88,10 @@ class WebDirectory implements InstallerScript
{
$webDir = $this->filesystem->normalizePath($this->pluginConfig->get('web-dir'));
$backendDir = $webDir . self::$typo3Dir;
// Ensure we delete a previously existing symlink to typo3 folder in web directory
if ($this->filesystem->isSymlinkedDirectory($backendDir)) {
$this->filesystem->removeDirectory($backendDir);
}
$this->filesystem->ensureDirectoryExists($backendDir);
$localRepository = $this->composer->getRepositoryManager()->getLocalRepository();
$package = $localRepository->findPackage('typo3/cms', new EmptyConstraint());
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment