Check if the cached js file exists
Fixes #8705 If the file does not exist (for whatever reason). It is never cached. No matter what the depscache etc tell you. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
d1547ee3b0
commit
2d7d8ca125
|
@ -104,13 +104,20 @@ class JSCombiner {
|
|||
* @return bool
|
||||
*/
|
||||
protected function isCached($fileName, ISimpleFolder $folder) {
|
||||
$fileName = str_replace('.json', '.js', $fileName) . '.deps';
|
||||
$fileName = str_replace('.json', '.js', $fileName);
|
||||
|
||||
if (!$folder->fileExists($fileName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$fileName = $fileName . '.deps';
|
||||
try {
|
||||
$deps = $this->depsCache->get($folder->getName() . '-' . $fileName);
|
||||
if ($deps === null || $deps === '') {
|
||||
$depFile = $folder->getFile($fileName);
|
||||
$deps = $depFile->getContent();
|
||||
}
|
||||
|
||||
// check again
|
||||
if ($deps === null || $deps === '') {
|
||||
$this->logger->info('JSCombiner: deps file empty: ' . $fileName);
|
||||
|
|
Loading…
Reference in New Issue