From fc0cdbb4a0c4ba30165aa0ab62369b3feb990367 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 2 Sep 2020 17:13:24 +0200 Subject: [PATCH] Use the correct root to determinate the webroot for the resource Since all the compiled routes are based on the server webroot, we have to use this, independent from which app this belongs to. Signed-off-by: Joas Schilling --- lib/private/Template/CSSResourceLocator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php index 750d33fd7261b..b5c16d1690b3f 100644 --- a/lib/private/Template/CSSResourceLocator.php +++ b/lib/private/Template/CSSResourceLocator.php @@ -109,7 +109,7 @@ protected function cacheAndAppendScssIfExist($root, $file, $app = 'core') { if (is_file($root.'/'.$file)) { if ($this->scssCacher !== null) { if ($this->scssCacher->process($root, $file, $app)) { - $this->append($root, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true); + $this->append($this->serverroot, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true); return true; } else { $this->logger->warning('Failed to compile and/or save '.$root.'/'.$file, ['app' => 'core']); @@ -145,7 +145,7 @@ public function append($root, $file, $webRoot = null, $throw = true, $scss = fal } } - $this->resources[] = [$webRoot? : \OC::$WEBROOT, $webRoot, $file]; + $this->resources[] = [$webRoot ?: \OC::$WEBROOT, $webRoot, $file]; } } }