Bug #46867
closedtypo3temp flooded by never used temporary files
0%
Description
The Classes AbstractDriver and LocalPreviewHelper are incorrectly using Utility\GeneralUtility::tempnam() method. Their methods are adding extension to names already created files. Those extended names are further used but not files created by Utility\GeneralUtility::tempnam().
F.e. There should be "preview_*" files on *nixes and there are "preXXX.tmp" files on Windows.
I suspect this is for IM needs but should be solved by different function of creating temporary names with extension.
My TYPO3 version is 6.0.4.
Updated by Tomasz Krawczyk almost 11 years ago
Hi!
In the TYPO3 6.1.5 the typo3temp/ is still flooded by zero sized, never used files created by PHP function tempnam().
On my Windows dev machine
D:\wamp\www\dev.testsite.local\typo3temp>ls -1 pre*.tmp | wc -l 87
I quickly browsed core sources and I think that there is lack of cleanup after Utility\GeneralUtility::tempnam() usage.
F.i.
LocalPreviewHelper->process()
$temporaryFileName = Utility\GeneralUtility::tempnam('preview_') . '.' . $task->getTargetFileExtension();
We are using $temporaryFileName but file created with Utility\GeneralUtility::tempnam() remains.
SpriteGenerator->generateGraphic()
$tempSprite = \TYPO3\CMS\Core\Utility\GeneralUtility::tempnam($this->spriteName);
We are using $tempSprite but file created with Utility\GeneralUtility::tempnam() remains.
Those files should be deleted before end of method.
Updated by Tomasz Krawczyk almost 11 years ago
This bug has been fixed in 6.2 (#54750). TYPO3 6.0 will not be supported from April, 6.1 will not bre supported from October. So, I think this bugreport can be closed.
Updated by Frans Saris over 10 years ago
- Status changed from New to Closed
- Is Regression set to No