Issue Bug Closed

#62104LocalDriver::getFileInfoByIdentifier can be optimised

Michiel Roos 10/08/14, 15:20 updated 10/02/18, 11:51

Description

\TYPO3\CMS\Core\Resource\Driver\LocalDriver::getFileInfoByIdentifier() fetches the dirPath of the given $fileIdentifier at the start of the method.

This information is not used untill the last line of the method.

The method may fail if the resource does not exist. By that time, some work was performed that was not needed.

I suggest moving the $dirPath calculation to the bottom of the method.

Reviews 1