From f19bbcc33e3be1e590cdb519c577d8ce8dcd0184 Mon Sep 17 00:00:00 2001 From: Joshua Westerheide <dev@jdoubleu.de> Date: Fri, 6 Apr 2018 10:51:30 +0200 Subject: [PATCH] [BUGFIX] Fix extraction path of language packs in LanguagePackService Due to the appended extension key an invalid directory structure was created. The language pack ".zip" files already contain extension directories. Resolves: #84638 Releases: master Related: #84131 Change-Id: I19d4fa418a5c09a88fb814fb0780e122655a24b0 Reviewed-on: https://review.typo3.org/56577 Reviewed-by: Tim Schreiner <schreiner.tim@gmail.com> Tested-by: Tim Schreiner <schreiner.tim@gmail.com> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> --- typo3/sysext/install/Classes/Service/LanguagePackService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/install/Classes/Service/LanguagePackService.php b/typo3/sysext/install/Classes/Service/LanguagePackService.php index f19df567240b..002a8e19d252 100644 --- a/typo3/sysext/install/Classes/Service/LanguagePackService.php +++ b/typo3/sysext/install/Classes/Service/LanguagePackService.php @@ -234,7 +234,8 @@ class LanguagePackService $packageUrl = $key[0] . '/' . $key[1] . '/' . $key . '-l10n/' . $key . '-l10n-' . $iso . '.zip'; } - $absoluteExtractionPath = GeneralUtility::getFileAbsFileName('typo3conf/l10n/' . $iso . '/' . $key . '/'); + $absoluteLanguagePath = GeneralUtility::getFileAbsFileName('typo3conf/l10n/' . $iso . '/'); + $absoluteExtractionPath = $absoluteLanguagePath . $key . '/'; $absolutePathToZipFile = Environment::getVarPath() . '/transient/' . $key . '-l10n-' . $iso . '.zip'; $packExists = is_dir($absoluteExtractionPath); @@ -253,7 +254,7 @@ class LanguagePackService GeneralUtility::mkdir_deep(Environment::getVarPath() . '/transient/'); $operationResult = GeneralUtility::writeFileToTypo3tempDir($absolutePathToZipFile, $languagePackContent) === null; } - $this->unzipTranslationFile($absolutePathToZipFile, $absoluteExtractionPath); + $this->unzipTranslationFile($absolutePathToZipFile, $absoluteLanguagePath); if ($operationResult) { $operationResult = unlink($absolutePathToZipFile); } -- GitLab