Bug #88332

incorrect generation of unique file name in BasicFileUtility

Added by Philipp Thiele 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2019-05-10
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

BasicFileUtility->getUniqueName() dosen't work correctly anymore since https://review.typo3.org/c/45695/
For the script it is no longer possible to determine a unique filenime "higher" then 99, because the unique string generation for numbers > maxNumber never kicks in
Steps to reproduce:
1) configure a field as

'type' => 'group',
'internal_type' => 'file',
'uploadfolder' => 'uploads/pics',

2) upload the same file 99 times (or place filename_1 to filename_99 in uploads/pics)
3) upload the same file another time - you will get the error "Copying file '' failed!: No destination file () possible!"

(possible) fix: revert change in https://review.typo3.org/c/Packages/TYPO3.CMS/+/45695/15/typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php#b291


Related issues

Related to TYPO3 Core - Task #77182: Cleanup and remove old filefunc logic Closed 2016-07-20
Duplicated by TYPO3 Core - Bug #88455: Never attach random string if file already exists in folder Resolved 2019-05-29

History

#1 Updated by Philipp Thiele 2 months ago

  • TYPO3 Version changed from 8 to 9

#2 Updated by Georg Ringer 2 months ago

  • Related to Task #77182: Cleanup and remove old filefunc logic added

#3 Updated by Georg Ringer about 1 month ago

  • Duplicated by Bug #88455: Never attach random string if file already exists in folder added

#4 Updated by Georg Ringer about 1 month ago

  • Status changed from New to Closed

Thanks for your report! I am fixing this with issue #88455 and therefore closing this one as duplicate.

Also available in: Atom PDF