summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-03-09 10:37:15 +0100
committerGitHub <noreply@github.com>2018-03-09 10:37:15 +0100
commite2728aaf387996bbe4d5f35056571ef3b6a6052b (patch)
treed65baab57a46cc1f4453658a40e68564873b3564 /lib
parent4fa0cac17c5b359e4351fbeccef6b8692c7dc3db (diff)
parent85ba5adb337738748000c9367b0bbeb62e08564f (diff)
downloadnextcloud-server-e2728aaf387996bbe4d5f35056571ef3b6a6052b.tar.gz
nextcloud-server-e2728aaf387996bbe4d5f35056571ef3b6a6052b.zip
Merge pull request #8746 from nextcloud/8705_13
[stable13] Check if the cached js file exists
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Template/JSCombiner.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php
index c5adcee6854..bc548c22fd0 100644
--- a/lib/private/Template/JSCombiner.php
+++ b/lib/private/Template/JSCombiner.php
@@ -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);