Project

General

Profile

Bug #79269 ยป 0001-BUGFIX-adjusting-condition-in-retrieveExternalFile.patch

David Greiner, 2017-01-11 11:24

View differences:

typo3/sysext/core/Classes/Resource/ResourceCompressor.php
$externalContent = GeneralUtility::getUrl($url);
$filename = $this->targetDirectory . 'external-' . md5($url);
// write only if file does not exist and md5 of the content is not the same as fetched one
if (!file_exists(PATH_site . $filename)
&& (md5($externalContent) !== md5(file_get_contents(PATH_site . $filename)))
if (!file_exists(PATH_site . $filename) ||
(file_exists(PATH_site . $filename) && md5($externalContent) !== md5(file_get_contents(PATH_site . $filename)))
) {
GeneralUtility::writeFile(PATH_site . $filename, $externalContent);
}
    (1-1/1)