Issue Bug Closed

#107864cleanup:localprocessedfiles always wipes all processed files

Česlav Przywara 10/27/25, 17:23 updated 12/02/25, 12:04

Description

After update to TYPO3 13.4.19, I noticed that all processed files are deleted from fileadmin/_procecessed_ whenever I run cleanup:localprocessedfiles command regardless whether they are referenced or not.

I think the issue is direct consequence of changes in #106002, but it seems to me that that the fix there revealed a bug in the internal logic of CleanUpLocalProcessedFilesService::getRecordsToClean(), which generates list of files with “//” in their path. This didn’t cause issues before, because SplFileInfo::getRealPath() resolves relative references – see: https://www.php.net/manual/en/splfileinfo.getrealpath.php

Before #106002:
echo $imageInfo->getRealPath(); // [...]/fileadmin/_processed_/[...]

After #106002:
echo $imageInfo->getPathname(); // [...]/fileadmin//_processed_/[...]

Possible fix: return path without trailing slash from CleanUpLocalProcessedFilesService::getAbsoluteBasePath().

Reviews 2