mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Also check file content to detect corrupted symlinks
This commit is contained in:
parent
7850afdb63
commit
1476d8d0f4
1 changed files with 2 additions and 1 deletions
|
|
@ -183,7 +183,8 @@ class FrontEndFileHandler extends Handler
|
|||
$originalFilePath = $file->fileRealPath . '/' . $pathInfo['basename'];
|
||||
|
||||
// Fix incorrectly minified URL
|
||||
if($file->isMinified && !$file->isExternalURL && (!file_exists($originalFilePath) || is_link($originalFilePath) || filesize($originalFilePath) < 32))
|
||||
if($file->isMinified && !$file->isExternalURL && (!file_exists($originalFilePath) || is_link($originalFilePath) ||
|
||||
(filesize($originalFilePath) < 32 && trim(file_get_contents($originalFilePath)) === $file->keyName)))
|
||||
{
|
||||
if(file_exists($file->fileRealPath . '/' . $file->fileNameNoExt . '.' . $file->fileExtension))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue