Update routine for broken symlink detection

This commit is contained in:
Kijin Sung 2016-06-29 19:20:53 +09:00
parent befe84f21b
commit aef4797c1c
2 changed files with 2 additions and 2 deletions

View file

@ -181,7 +181,7 @@ class FrontEndFileHandler extends Handler
// Fix incorrectly minified URL
if($file->isMinified && !$file->isExternalURL && (!file_exists($file->fileFullPath) || is_link($file->fileFullPath) ||
(filesize($file->fileFullPath) < 32 && trim(file_get_contents($file->fileFullPath)) === $file->keyName)))
(filesize($file->fileFullPath) < 40 && trim(file_get_contents($file->fileFullPath)) === $file->keyName)))
{
if(file_exists($file->fileRealPath . '/' . $file->fileNameNoExt . '.' . $file->fileExtension))
{

View file

@ -20,7 +20,7 @@
/* Intercept getScript error due to broken minified script URL */
$(document).ajaxError(function(event, jqxhr, settings, thrownError) {
if(settings.dataType === "script" && (jqxhr.status >= 400 || (jqxhr.responseText && jqxhr.responseText.length < 32))) {
if(settings.dataType === "script" && (jqxhr.status >= 400 || (jqxhr.responseText && jqxhr.responseText.length < 40))) {
var match = /^(.+)\.min\.(css|js)($|\?)/.exec(settings.url);
if(match) {
$.getScript(match[1] + "." + match[2], settings.success);