Skip to content

Commit

Permalink
Merge pull request #22550 from nextcloud/bugfix/13556/use-correct-roo…
Browse files Browse the repository at this point in the history
…t-when-compiling-scss

Use the correct root to determinate the webroot for the resource
  • Loading branch information
nickvergessen authored Sep 4, 2020
2 parents 84fe444 + 87aa9b1 commit e690f0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Template/CSSResourceLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down Expand Up @@ -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];
}
}
}

0 comments on commit e690f0e

Please sign in to comment.