Verified Commit 9dbcb503 authored by Jens Jacobsen's avatar Jens Jacobsen
Browse files

[BUGFIX] Prune leading zeros from version number in download filenames

Prune leading zeros from version number strings when generating the
download file name.

Fixes #353
parent 64ae2ba9
Pipeline #4441 passed with stages
in 5 minutes and 14 seconds
......@@ -162,7 +162,8 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider
}
$extension = strtolower($extension);
$fileType = strtolower(trim($fileType, '. '));
return $extension[0] . '/' . $extension[1] . '/' . $extension . '_' . $version . '.' . $fileType;
$versionNumberInFileName = implode('.', \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode('.', $version));
return $extension[0] . '/' . $extension[1] . '/' . $extension . '_' . $versionNumberInFileName . '.' . $fileType;
}
......
Markdown is supported
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