Project

General

Profile

Actions

Bug #46867

closed

typo3temp flooded by never used temporary files

Added by Tomasz Krawczyk over 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2013-04-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions #1

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.

Actions #2

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.

Actions #3

Updated by Frans Saris over 10 years ago

  • Status changed from New to Closed
  • Is Regression set to No
Actions

Also available in: Atom PDF