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
3867a74f0d
commit
34b86edc34
|
@ -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