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 32dabb48c0d..29f3efaa8da 100644 --- a/lib/private/Template/CSSResourceLocator.php +++ b/lib/private/Template/CSSResourceLocator.php @@ -71,6 +71,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 97a9eacedf5..93a737b66cc 100644 --- a/lib/private/Template/JSResourceLocator.php +++ b/lib/private/Template/JSResourceLocator.php @@ -75,6 +75,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); |