Merge pull request #51 from kijin/pr/stupid-symlinks

Zip으로 다운받은 경우 압축 스크립트가 깨지는 문제 수정
This commit is contained in:
Kijin Sung 2016-01-12 11:10:49 +09:00
commit c39706c480
2 changed files with 12 additions and 1 deletions

View file

@ -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)))
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))
{