diff options
Diffstat (limited to 'lib/private/Template')
-rw-r--r-- | lib/private/Template/CSSResourceLocator.php | 5 | ||||
-rw-r--r-- | lib/private/Template/JSResourceLocator.php | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php index 087ddec38ef..3c30a9d3356 100644 --- a/lib/private/Template/CSSResourceLocator.php +++ b/lib/private/Template/CSSResourceLocator.php @@ -76,6 +76,11 @@ class CSSResourceLocator extends ResourceLocator { return; } + // Account for the possibility of having symlinks in app path. Doing + // this here instead of above as an empty argument to realpath gets + // turned into cwd. + $app_path = realpath($app_path); + if(!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) { $this->append($app_path, $style.'.css', $app_url); } diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php index 9a2e0848214..d38488e4618 100644 --- a/lib/private/Template/JSResourceLocator.php +++ b/lib/private/Template/JSResourceLocator.php @@ -76,6 +76,13 @@ class JSResourceLocator extends ResourceLocator { $app_path = \OC_App::getAppPath($app); $app_url = \OC_App::getAppWebPath($app); + if ($app_path !== false) { + // Account for the possibility of having symlinks in app path. Only + // do this if $app_path is set, because an empty argument to realpath + // gets turned into cwd. + $app_path = realpath($app_path); + } + // missing translations files fill be ignored if (strpos($script, 'l10n/') === 0) { $this->appendIfExist($app_path, $script . '.js', $app_url); |