Skip to content
Snippets Groups Projects
Commit a77d11ae authored by Georg Ringer's avatar Georg Ringer Committed by Daniel Goerz
Browse files

[BUGFIX] Change comparison in BasicFileUtility

Due to an unrelated change within #76257,
BasicFileUtility never accounts for proper
creating a randomly unique name.

Resolves: #88455
Related: #76257
Releases: master, 9.5, 8.7
Change-Id: I41fe95a9b5b68a7d29cf529f0877331197990940
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60885


Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
parent b17c0e0e
Branches
Tags
No related merge requests found
......@@ -173,7 +173,7 @@ class BasicFileUtility
$theTempFileBody = preg_replace('/_[0-9][0-9]$/', '', $origFileInfo['filebody']);
// This removes _xx if appended to the file
$theOrigExt = $origFileInfo['realFileext'] ? '.' . $origFileInfo['realFileext'] : '';
for ($a = 1; $a < $this->maxNumber; $a++) {
for ($a = 1; $a <= $this->maxNumber + 1; $a++) {
if ($a <= $this->maxNumber) {
// First we try to append numbers
$insert = '_' . sprintf('%02d', $a);
......
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